summary refs log tree commit diff stats
path: root/tests/objects/t19342.nim
blob: d40d15a4b81f7d022c588013ebe596e9eb9f9366 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
  targets: "c cpp"
"""

{.compile: "m19342.c".}

# bug #19342
type
  Node* {.bycopy.} = 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()