destructors: bugfix: lhs of assignment is irrelevant
This commit is contained in:
parent
45d74f4081
commit
a0c5260c20
1 changed files with 1 additions and 2 deletions
|
|
@ -251,8 +251,7 @@ proc p(n: PNode; c: var Con): PNode =
|
||||||
result = copyNode(n)
|
result = copyNode(n)
|
||||||
recurse(n, result)
|
recurse(n, result)
|
||||||
of nkAsgn, nkFastAsgn:
|
of nkAsgn, nkFastAsgn:
|
||||||
# XXX if special, call special operator
|
if hasDestructor(n[0].typ):
|
||||||
if n[0].kind == nkSym and interestingSym(n[0].sym):
|
|
||||||
result = moveOrCopy(n[0], n[1], c)
|
result = moveOrCopy(n[0], n[1], c)
|
||||||
else:
|
else:
|
||||||
result = copyNode(n)
|
result = copyNode(n)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue