for kw in ("except", "except*"):
exec(code % kw, g, l);
+ def test_regression_gh_120225(self):
+ async def name_4():
+ match b'':
+ case True:
+ pass
+ case name_5 if f'e':
+ {name_3: name_4 async for name_2 in name_5}
+ case []:
+ pass
+ [[]]
@requires_debug_ranges()
class TestSourcePositions(unittest.TestCase):
if (!IS_LABEL(b->b_next->b_label)) {
b->b_next->b_label.id = next_lbl++;
}
- cfg_instr *prev_instr = basicblock_last_instr(b);
- // b cannot be empty because at the end of an exception handler
- // there is always a POP_EXCEPT + RERAISE/RETURN
- assert(prev_instr);
-
basicblock_addop(explicit_jump, JUMP_NO_INTERRUPT, b->b_next->b_label.id,
- prev_instr->i_loc);
+ NO_LOCATION);
explicit_jump->b_cold = 1;
explicit_jump->b_next = b->b_next;
+ explicit_jump->b_predecessors = 1;
b->b_next = explicit_jump;
/* set target */