Files
Nim/tests/openarray/topenarrayrepr.nim
flywind 9df195ef58 style usages part one (openarray => openArray) (#19321)
* style usages (openArray)

* revert doc changes
2022-01-04 13:29:50 +01:00

14 lines
242 B
Nim

discard """
output: "5 - [1]"
"""
type
TProc = proc (n: int, m: openArray[int64]) {.nimcall.}
proc Foo(x: int, P: TProc) =
P(x, [ 1'i64 ])
proc Bar(n: int, m: openArray[int64]) =
echo($n & " - " & repr(m))
Foo(5, Bar) #OUT 5 - [1]