diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-02-17 20:44:11 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-02-17 20:44:11 +0200 |
commit | eaab22089da855163485949d8bd6a6ae9c1d25c8 (patch) | |
tree | e2efcda3c7e0e0517346a262c69dddce70ed8588 /compiler | |
parent | 9dd753f218cb3f8a3460d66cf4f917fab74eb233 (diff) | |
download | Nim-eaab22089da855163485949d8bd6a6ae9c1d25c8.tar.gz |
fix #807
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semstmts.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index ee085a821..503ea4bc1 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1324,8 +1324,8 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode = let (outer, inner) = insertDestructors(c, n.sons[i]) if outer != nil: n.sons[i] = outer - for j in countup(i+1, length-1): - inner.addSon(semStmt(c, n.sons[j])) + var rest = newNode(nkStmtList, n.info, n.sons[i+1 .. length-1]) + inner.addSon(semStmtList(c, rest, flags)) n.sons.setLen(i+1) return of LastBlockStmts: |