mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.12] gh-109627: duplicated small exit blocks need to be assigned jump target labels (#109630) (#109632)
gh-109627: duplicated smalll exit blocks need to be assigned jump target labels (#109630)
(cherry picked from commit 9ccf0545ef
)
This commit is contained in:
parent
92a347997f
commit
107e14820a
3 changed files with 29 additions and 6 deletions
|
@ -1216,6 +1216,15 @@ class TestSpecifics(unittest.TestCase):
|
|||
return a
|
||||
self.assertEqual(f("x", "y", "z"), "y")
|
||||
|
||||
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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue