t19342_2.nim 268 B

123456789101112131415161718
  1. discard """
  2. targets: "c cpp"
  3. """
  4. {.compile: "m19342.c".}
  5. # bug #19342
  6. type
  7. Node* {.byRef.} = object
  8. data: array[25, cint]
  9. proc myproc(name: cint): Node {.importc: "hello", cdecl.}
  10. proc parse =
  11. let node = myproc(10)
  12. doAssert node.data[0] == 999
  13. parse()