topenarrayrepr.nim 242 B

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