summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-10-21 13:38:34 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-10-21 13:38:34 +0200
commitc247b50c0080fbb15b53f5ad568fee2f5a292928 (patch)
treec1d7ae0bab84bce91831e89c6171455d0612a155 /compiler
parent7fce1bcf92005dddcd454616a06129b899826019 (diff)
downloadNim-c247b50c0080fbb15b53f5ad568fee2f5a292928.tar.gz
fixes #4808
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sempass2.nim3
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]