Closed
Description
def test_except_handler_label(self):
#
insts = [
('SETUP_FINALLY', handler := self.Label(), 10),
('POP_BLOCK', 0, -1),
('RETURN_CONST', 1, 11),
handler,
('RETURN_CONST', 2, 12),
]
expected_insts = [
('SETUP_FINALLY', handler := self.Label(), 10),
('RETURN_CONST', 1, 11),
handler,
('RETURN_CONST', 2, 12),
]
self.cfg_optimization_test(insts, expected_insts, consts=list(range(5)))
This test fails because the code returns with SETUP_FINALLY
uninitialized.