Files
Nim/tests/objects/t19342_2.nim
flywind 0c3892c3c7 nvro don't touch cdecl types [backport: 1.6] (#19461)
* nvro don't touch cdecl types; fix #19342 again
2022-01-28 09:53:42 +01:00

18 lines
268 B
Nim

discard """
targets: "c cpp"
"""
{.compile: "m19342.c".}
# bug #19342
type
Node* {.byRef.} = object
data: array[25, cint]
proc myproc(name: cint): Node {.importc: "hello", cdecl.}
proc parse =
let node = myproc(10)
doAssert node.data[0] == 999
parse()