style usages part one (openarray => openArray) (#19321)

* style usages (openArray)

* revert doc changes
This commit is contained in:
flywind 2022-01-04 20:29:50 +08:00 • committed by GitHub
commit 9df195ef58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 76 additions and 76 deletions

View file

@ -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

View file

@ -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"

View file

@ -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"