diff options
author | Aman Gupta <aman@tmm1.net> | 2015-10-13 15:25:40 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2015-10-13 15:25:40 -0700 |
commit | e2dbf222e60e00eb3f321151f4f206ed9c606a6c (patch) | |
tree | c513c0051fcb789add33cd3daaaab42344ee1da4 /compiler/transf.nim | |
parent | c3415a27d77f302be4f41d5f9bbcdf7c0dd3e80a (diff) | |
parent | 7f4f37eaa20ea8aa5cf8c34e497aaa8245c590b3 (diff) | |
download | Nim-e2dbf222e60e00eb3f321151f4f206ed9c606a6c.tar.gz |
Merge remote-tracking branch 'origin/devel' into appveyor
Diffstat (limited to 'compiler/transf.nim')
-rw-r--r-- | compiler/transf.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim index 0ea9f7d80..92319ac19 100644 --- a/compiler/transf.nim +++ b/compiler/transf.nim @@ -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}: |