diff options
Diffstat (limited to 'tests/run/topenarrayrepr.nim')
-rwxr-xr-x | tests/run/topenarrayrepr.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run/topenarrayrepr.nim b/tests/run/topenarrayrepr.nim new file mode 100755 index 000000000..ec7be722a --- /dev/null +++ b/tests/run/topenarrayrepr.nim @@ -0,0 +1,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] + + + |