summary refs log tree commit diff stats
path: root/tests/openarray/topenarrayrepr.nim
blob: fc40d88c37f863b579f906204611b74625daca57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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]