Files
Nim/tests/misc/t18079.nim
ringabout 51f410e1d5 megatest now checks refc too (#21341)
* megatest now checks refc too

* fixes refc
2023-02-09 16:14:39 -05:00

16 lines
204 B
Nim

discard """
matrix: "--mm:orc"
"""
type
Foo = object
y: int
Bar = object
x: Foo
proc baz(state: var Bar):int =
state.x.y = 2
state.x.y
doAssert baz((ref Bar)(x: (new Foo)[])[]) == 2