diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-10-21 13:38:34 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-10-21 13:38:34 +0200 |
commit | c247b50c0080fbb15b53f5ad568fee2f5a292928 (patch) | |
tree | c1d7ae0bab84bce91831e89c6171455d0612a155 /compiler | |
parent | 7fce1bcf92005dddcd454616a06129b899826019 (diff) | |
download | Nim-c247b50c0080fbb15b53f5ad568fee2f5a292928.tar.gz |
fixes #4808
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sempass2.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index df9b3f69c..1c61373c2 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -721,7 +721,8 @@ proc track(tracked: PEffects, n: PNode) = # and it's not a recursive call: if not (a.kind == nkSym and a.sym == tracked.owner): markSideEffect(tracked, a) - for i in 1 .. <len(n): trackOperand(tracked, n.sons[i], paramType(op, i)) + if a.kind != nkSym or a.sym.magic != mNBindSym: + for i in 1 .. <len(n): trackOperand(tracked, n.sons[i], paramType(op, i)) if a.kind == nkSym and a.sym.magic in {mNew, mNewFinalize, mNewSeq}: # may not look like an assignment, but it is: let arg = n.sons[1] |