fixes yet another regression caused by the .procvar removal

This commit is contained in:
Andreas Rumpf
2017-04-14 19:18:26 +02:00
parent ce86b4ad78
commit 55b5401dc6

View File

@@ -783,6 +783,10 @@ proc track(tracked: PEffects, n: PNode) =
notNilCheck(tracked, last, child.sons[i].typ)
# since 'var (a, b): T = ()' is not even allowed, there is always type
# inference for (a, b) and thus no nil checking is necessary.
of nkConstSection:
for child in n:
let last = lastSon(child)
track(tracked, last)
of nkCaseStmt: trackCase(tracked, n)
of nkWhen, nkIfStmt, nkIfExpr: trackIf(tracked, n)
of nkBlockStmt, nkBlockExpr: trackBlock(tracked, n.sons[1])