fixes #2963
This commit is contained in:
parent
f192d5aab3
commit
862ee8d1d3
3 changed files with 18 additions and 4 deletions
|
|
@ -1101,7 +1101,10 @@ proc genAsgn(p: BProc, e: PNode, fastAsgn: bool) =
|
|||
genGotoVar(p, e.sons[1])
|
||||
elif not fieldDiscriminantCheckNeeded(p, e):
|
||||
var a: TLoc
|
||||
initLocExpr(p, e.sons[0], a)
|
||||
if e[0].kind in {nkDerefExpr, nkHiddenDeref}:
|
||||
genDeref(p, e[0], a, enforceDeref=true)
|
||||
else:
|
||||
initLocExpr(p, e.sons[0], a)
|
||||
if fastAsgn: incl(a.flags, lfNoDeepCopy)
|
||||
assert(a.t != nil)
|
||||
loadInto(p, e.sons[0], e.sons[1], a)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue