fixes tunittest crash

This commit is contained in:
Araq
2015-10-13 16:31:30 +02:00
parent aeb69dbe84
commit 7f4f37eaa2

View File

@@ -825,11 +825,13 @@ proc flattenStmts(n: PNode) =
var goOn = true
while goOn:
goOn = false
for i in 0..<n.len:
var i = 0
while i < n.len:
let it = n[i]
if it.kind in {nkStmtList, nkStmtListExpr}:
n.sons[i..i] = it.sons[0..<it.len]
goOn = true
inc i
proc liftDeferAux(n: PNode) =
if n.kind in {nkStmtList, nkStmtListExpr}: