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
|
|
@ -12,7 +12,7 @@ type
|
|||
|
||||
proc newDog():PDog = new(result)
|
||||
proc newCat():PCat = new(result)
|
||||
proc test(a:openarray[PAnimal])=
|
||||
proc test(a:openArray[PAnimal])=
|
||||
echo("dummy")
|
||||
|
||||
#test(newDog(),newCat()) #does not work
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ discard """
|
|||
|
||||
import json, tables, algorithm
|
||||
|
||||
proc outp(a: openarray[int]) =
|
||||
proc outp(a: openArray[int]) =
|
||||
stdout.write "["
|
||||
for i in a: stdout.write($i & " ")
|
||||
stdout.write "]\n"
|
||||
|
|
|
|||
|
|
@ -3,18 +3,18 @@ discard """
|
|||
"""
|
||||
var s = "HI"
|
||||
|
||||
proc x (zz: openarray[char]) =
|
||||
proc x (zz: openArray[char]) =
|
||||
discard
|
||||
|
||||
x s
|
||||
|
||||
proc z [T] (zz: openarray[T]) =
|
||||
proc z [T] (zz: openArray[T]) =
|
||||
discard
|
||||
|
||||
z s
|
||||
z([s,s,s])
|
||||
|
||||
proc y [T] (arg: var openarray[T]) =
|
||||
proc y [T] (arg: var openArray[T]) =
|
||||
arg[0] = 'X'
|
||||
y s
|
||||
doAssert s == "XI"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue