diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-04-05 11:32:23 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-04-05 11:32:23 +0200 |
commit | 88c4d6aabed415150068b440ce8860644aa56152 (patch) | |
tree | 0c77b8f8648006a900507ca407afbf974bc2a322 | |
parent | ac81a99892d03402f5d389bbd624c2bff660d9ef (diff) | |
download | Nim-88c4d6aabed415150068b440ce8860644aa56152.tar.gz |
fix another compiler regression
-rw-r--r-- | compiler/sempass2.nim | 4 |
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]) |