diff --git a/compiler/dfa.nim b/compiler/dfa.nim index 0cefec2858d1d..7db5f5f65af50 100644 --- a/compiler/dfa.nim +++ b/compiler/dfa.nim @@ -541,8 +541,8 @@ template genNoReturn(c: var Con; n: PNode) = c.code.add Instr(n: n, kind: goto, dest: high(int) - c.code.len) proc genRaise(c: var Con; n: PNode) = - genJoins(c, n) gen(c, n[0]) + genJoins(c, n) if c.inTryStmt > 0: c.tryStmtFixups.add c.gotoI(n) else: @@ -553,11 +553,11 @@ proc genImplicitReturn(c: var Con) = gen(c, c.owner.ast[resultPos]) proc genReturn(c: var Con; n: PNode) = - genJoins(c, n) if n[0].kind != nkEmpty: gen(c, n[0]) else: genImplicitReturn(c) + genJoins(c, n) genNoReturn(c, n) const diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim index 29199aa415b44..5aec088aa4bda 100644 --- a/compiler/injectdestructors.nim +++ b/compiler/injectdestructors.nim @@ -910,6 +910,10 @@ proc p(n: PNode; c: var Con; mode: ProcessMode): PNode = for i in 0..