mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-120225: fix crash in compiler on empty block at end of exception handler (#120235)
This commit is contained in:
parent
e6076d1e13
commit
4fc82b6d3b
3 changed files with 13 additions and 6 deletions
|
@ -1409,6 +1409,16 @@ class TestSpecifics(unittest.TestCase):
|
|||
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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue