Skip to content

Commit

Permalink
fix reinited if builder in gentrycpp
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Nov 7, 2024
1 parent f6d7ff6 commit cec6d0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/ccgstmts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,9 @@ proc genTryCpp(p: BProc, t: PNode, d: var TLoc) =
appcg(p.module, orExpr, "#isObj(#nimBorrowCurrentException()->$1, $2)", [memberName, checkFor])

if orExpr.len != 0:
hasIf = true
ifStmt = initIfStmt(p.s(cpsStmts))
if not hasIf:
hasIf = true
ifStmt = initIfStmt(p.s(cpsStmts))
startBlockWith(p):
initElifBranch(p.s(cpsStmts), ifStmt, orExpr)
if exvar != nil:
Expand Down

0 comments on commit cec6d0e

Please sign in to comment.