summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-04-05 11:32:23 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-04-05 11:32:23 +0200
commit88c4d6aabed415150068b440ce8860644aa56152 (patch)
tree0c77b8f8648006a900507ca407afbf974bc2a322
parentac81a99892d03402f5d389bbd624c2bff660d9ef (diff)
downloadNim-88c4d6aabed415150068b440ce8860644aa56152.tar.gz
fix another compiler regression
-rw-r--r--compiler/sempass2.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index 2133d9bef..88c05faa4 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -833,6 +833,10 @@ proc track(tracked: PEffects, n: PNode) =
   of nkTypeSection, nkProcDef, nkConverterDef, nkMethodDef, nkIteratorDef,
       nkMacroDef, nkTemplateDef, nkLambda, nkDo:
     discard
+  of nkCast, nkHiddenStdConv, nkHiddenSubConv, nkConv:
+    if n.len == 2: track(tracked, n.sons[1])
+  of nkObjUpConv, nkObjDownConv, nkChckRange, nkChckRangeF, nkChckRange64:
+    if n.len == 1: track(tracked, n.sons[0])
   else:
     for i in 0 .. <safeLen(n): track(tracked, n.sons[i])