style usages part one (openarray => openArray) (#19321)
* style usages (openArray) * revert doc changes
This commit is contained in:
parent
1869826668
commit
9df195ef58
49 changed files with 76 additions and 76 deletions
|
|
@ -3,7 +3,7 @@ discard """
|
|||
errormsg: "wrong number of variables"
|
||||
"""
|
||||
|
||||
iterator xclusters*[T](a: openarray[T]; s: static[int]): array[s, T] {.inline.} =
|
||||
iterator xclusters*[T](a: openArray[T]; s: static[int]): array[s, T] {.inline.} =
|
||||
var result: array[s, T] # iterators have no default result variable
|
||||
var i = 0
|
||||
while i < len(a):
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import strscans, strutils
|
|||
proc raiseTestException*() =
|
||||
raise newException(Exception, "test")
|
||||
|
||||
proc matchStackTrace(actualEntries: openarray[StackTraceEntry], expected: string) =
|
||||
proc matchStackTrace(actualEntries: openArray[StackTraceEntry], expected: string) =
|
||||
var expectedEntries = newSeq[StackTraceEntry]()
|
||||
var i = 0
|
||||
|
||||
|
|
|
|||
|
|
@ -132,12 +132,12 @@ block:
|
|||
echo foo(fun)
|
||||
|
||||
block:
|
||||
# bug #10285 Function signature don't match when inside seq/array/openarray
|
||||
# bug #10285 Function signature don't match when inside seq/array/openArray
|
||||
# Note: the error message now shows `closure` which helps debugging the issue
|
||||
# out why it doesn't match
|
||||
proc takesFunc(f: proc (x: int) {.gcsafe, locks: 0.}) =
|
||||
echo "takes single Func"
|
||||
proc takesFuncs(fs: openarray[proc (x: int) {.gcsafe, locks: 0.}]) =
|
||||
proc takesFuncs(fs: openArray[proc (x: int) {.gcsafe, locks: 0.}]) =
|
||||
echo "takes multiple Func"
|
||||
takesFunc(proc (x: int) {.gcsafe, locks: 0.} = echo x) # works
|
||||
takesFuncs([proc (x: int) {.gcsafe, locks: 0.} = echo x]) # fails
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue