| ... | @@ -2435,6 +2435,7 @@ fn blockExpr( | ... | @@ -2435,6 +2435,7 @@ fn blockExpr( |
| 2435 | if (!block_scope.endsWithNoReturn()) { | 2435 | if (!block_scope.endsWithNoReturn()) { |
| 2436 | // As our last action before the break, "pop" the error trace if needed | 2436 | // As our last action before the break, "pop" the error trace if needed |
| 2437 | _ = try gz.addRestoreErrRetIndex(.{ .block = block_inst }, .always, block_node); | 2437 | _ = try gz.addRestoreErrRetIndex(.{ .block = block_inst }, .always, block_node); |
| | 2438 | // No `rvalue` call here, as the block result is always `void`, so we do that below. |
| 2438 | _ = try block_scope.addBreak(.@"break", block_inst, .void_value); | 2439 | _ = try block_scope.addBreak(.@"break", block_inst, .void_value); |
| 2439 | } | 2440 | } |
| 2440 | | 2441 | |
| ... | @@ -2531,7 +2532,8 @@ fn labeledBlockExpr( | ... | @@ -2531,7 +2532,8 @@ fn labeledBlockExpr( |
| 2531 | if (!block_scope.endsWithNoReturn()) { | 2532 | if (!block_scope.endsWithNoReturn()) { |
| 2532 | // As our last action before the return, "pop" the error trace if needed | 2533 | // As our last action before the return, "pop" the error trace if needed |
| 2533 | _ = try gz.addRestoreErrRetIndex(.{ .block = block_inst }, .always, block_node); | 2534 | _ = try gz.addRestoreErrRetIndex(.{ .block = block_inst }, .always, block_node); |
| 2534 | _ = try block_scope.addBreak(.@"break", block_inst, .void_value); | 2535 | const result = try rvalue(gz, block_scope.break_result_info, .void_value, block_node); |
| | 2536 | _ = try block_scope.addBreak(.@"break", block_inst, result); |
| 2535 | } | 2537 | } |
| 2536 | | 2538 | |
| 2537 | if (!block_scope.label.?.used) { | 2539 | if (!block_scope.label.?.used) { |