This commit is contained in:
Andreas Rumpf 2016-08-24 11:48:21 +02:00
commit 18e37cad08
2 changed files with 28 additions and 0 deletions

View file

@ -670,6 +670,8 @@ proc genDeref(p: BProc, e: PNode, d: var TLoc; enforceDeref=false) =
#if e[0].kind != nkBracketExpr:
# message(e.info, warnUser, "CAME HERE " & renderTree(e))
expr(p, e.sons[0], d)
if e.sons[0].typ.skipTypes(abstractInst).kind == tyRef:
d.s = OnHeap
else:
var a: TLoc
let typ = skipTypes(e.sons[0].typ, abstractInst)