add comment
This commit is contained in:
parent
972707440a
commit
268461f06e
1 changed files with 2 additions and 1 deletions
|
|
@ -620,7 +620,8 @@ proc p(n: PNode; c: var Con): PNode =
|
||||||
of nkAsgn, nkFastAsgn:
|
of nkAsgn, nkFastAsgn:
|
||||||
if hasDestructor(n[0].typ):
|
if hasDestructor(n[0].typ):
|
||||||
result = moveOrCopy(n[0], n[1], c)
|
result = moveOrCopy(n[0], n[1], c)
|
||||||
c.enableDestructor(n[0].sym)
|
c.enableDestructor(n[0].sym) # last read to sink argument could have disabled the destructor
|
||||||
|
# but the variable is assigned again and new value should be destroyed
|
||||||
else:
|
else:
|
||||||
result = copyNode(n)
|
result = copyNode(n)
|
||||||
recurse(n, result)
|
recurse(n, result)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue