parent
a581118d0e
commit
23230572e2
2 changed files with 17 additions and 2 deletions
|
|
@ -13,3 +13,17 @@ type AnotherType = object
|
|||
let x = AnotherType(f: newMyRefObject("hello"))
|
||||
echo $x.f
|
||||
|
||||
|
||||
# bug #7363
|
||||
|
||||
type
|
||||
Foo = object
|
||||
a: cint
|
||||
Foo2 = object
|
||||
b: cint
|
||||
|
||||
proc f(foo: ptr Foo, foo2: ptr Foo2): cint =
|
||||
if foo != nil: {.emit: "`result` = `foo`->a;".}
|
||||
if foo2 != nil: {.emit: [result, " = ", foo2[], ".b;"].}
|
||||
|
||||
discard f(nil, nil)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue