diff options
-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]) |