diff options
Diffstat (limited to 'compiler/closureiters.nim')
-rw-r--r-- | compiler/closureiters.nim | 2 |
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: |