summary refs log tree commit diff stats
path: root/compiler/closureiters.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-08-05 14:17:24 +0200
committerAraq <rumpf_a@web.de>2018-08-05 14:17:24 +0200
commit7ac6462cbd30bcdb1c3805fbb06be13b3346ce2a (patch)
tree2e79c210ccd19a7065b36992e19ab74ff061f5df /compiler/closureiters.nim
parent282c4f3d0a72fbb4c49df51048e2e13fafcd8659 (diff)
parent74842ed4a981b6ff168d67d05ee92dce350549cb (diff)
downloadNim-7ac6462cbd30bcdb1c3805fbb06be13b3346ce2a.tar.gz
make at least bootstrapping work
Diffstat (limited to 'compiler/closureiters.nim')
-rw-r--r--compiler/closureiters.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/closureiters.nim b/compiler/closureiters.nim
index 6fa856b2f..9e4885b66 100644
--- a/compiler/closureiters.nim
+++ b/compiler/closureiters.nim
@@ -588,7 +588,7 @@ proc lowerStmtListExprs(ctx: var Ctx, n: PNode, needsSplit: var bool): PNode =
           let branch = n[i]
           case branch.kind
           of nkOfBranch:
-            branch[1] = ctx.convertExprBodyToAsgn(branch[1], tmp)
+            branch[^1] = ctx.convertExprBodyToAsgn(branch[^1], tmp)
           of nkElse:
             branch[0] = ctx.convertExprBodyToAsgn(branch[0], tmp)
           else: