Fix #11111 nkIdentsDef left in vmgen (#11126)

fixes #11111
This commit is contained in:
Mamy Ratsimbazafy
2019-04-27 15:29:39 +02:00
committed by cooldome
parent 3647c03cad
commit 98002149a8

View File

@@ -1585,8 +1585,8 @@ proc genGlobalInit(c: PCtx; n: PNode; s: PSym) =
# var decls{.compileTime.}: seq[NimNode] = @[]
let dest = c.getTemp(s.typ)
c.gABx(n, opcLdGlobal, dest, s.position)
if s.ast != nil:
let tmp = c.genx(s.ast)
if s.astdef != nil:
let tmp = c.genx(s.astdef)
c.genAdditionalCopy(n, opcWrDeref, dest, 0, tmp)
c.freeTemp(dest)
c.freeTemp(tmp)