mirror of
https://github.com/python/cpython.git
synced 2025-08-29 13:15:11 +00:00
gh-109889: fix compiler's redundant NOP detection to look past NOPs with no lineno when looking for the next instruction's lineno (#109987)
This commit is contained in:
parent
b14f0ab51c
commit
f580edcc6a
3 changed files with 18 additions and 1 deletions
|
@ -1278,6 +1278,11 @@ class TestSpecifics(unittest.TestCase):
|
|||
while x:
|
||||
0 if 1 else 0
|
||||
|
||||
def test_remove_redundant_nop_edge_case(self):
|
||||
# See gh-109889
|
||||
def f():
|
||||
a if (1 if b else c) else d
|
||||
|
||||
@requires_debug_ranges()
|
||||
class TestSourcePositions(unittest.TestCase):
|
||||
# Ensure that compiled code snippets have correct line and column numbers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue