Nim/tests/ccgbugs/t14160.nim
Clyybber d6e1b5c070
Fix #14160 (#14161)
* Fix #14160

* Add testcase
2020-04-30 02:01:07 +02:00

15 lines
272 B
Nim

type
TPassContext = object of RootObj
PPassContext = ref TPassContext
PCtx = ref object of TPassContext
a: int
ModuleGraph = object
vm: RootRef
proc main() =
var g = ModuleGraph(vm: new(Pctx))
PCtx(g.vm) = nil #This generates invalid C code
main()