summary refs log tree commit diff stats
path: root/tests/accept/run/topenarrayrepr.nim
blob: ec7be722a1c1c58a2125b1866515b5ae88b5b888 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
discard """
  file: "topenarrayrepr.nim"
  output: "5 - [1]"
"""
type
  TProc = proc (n: int, m: openarray[int64])

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]