Files
Nim/tests/misc/t18079.nim
Bung ecc8f61fe4 Fix #18079 Illegal storage access compiling call with nested ref/deref (#20738)
* add test case
* refactoring transformAddrDeref and fix #18079
* fix jsgen
2022-11-04 09:54:45 +01:00

12 lines
166 B
Nim

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