summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-09-20 23:08:06 (GMT)
committerGitHub <noreply@github.com>2023-09-20 23:08:06 (GMT)
commit9ccf0545efd5bc5af5aa51774030c471d49a972b (patch)
treeb55fefefa886638de6a493944674b0e053089a3f /Lib
parent14cdefa667f211401c9dfab33c4695e80b4e5e95 (diff)
downloadcpython-9ccf0545efd5bc5af5aa51774030c471d49a972b.zip
cpython-9ccf0545efd5bc5af5aa51774030c471d49a972b.tar.gz
cpython-9ccf0545efd5bc5af5aa51774030c471d49a972b.tar.bz2
gh-109627: duplicated smalll exit blocks need to be assigned jump target labels (#109630)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_compile.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 39d972c..f4e2855 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -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):