gh-109627: duplicated smalll exit blocks need to be assigned jump target labels (#109630)

This commit is contained in:
Irit Katriel 2023-09-21 00:08:06 +01:00 committed by GitHub
parent 14cdefa667
commit 9ccf0545ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 6 deletions

View file

@ -1252,6 +1252,15 @@ class TestSpecifics(unittest.TestCase):
return a, b
self.assertEqual(f(), (54, 96))
def test_duplicated_small_exit_block(self):
# See gh-109627
def f():
while element and something:
try:
return something
except:
pass
@requires_debug_ranges()
class TestSourcePositions(unittest.TestCase):