mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
GH-128682: Stronger checking of PyStackRef_CLOSE and DEAD. (GH-128683)
This commit is contained in:
parent
6ff8f82f92
commit
517dc65ffc
7 changed files with 224 additions and 127 deletions
|
|
@ -1739,6 +1739,18 @@ class TestGeneratedCases(unittest.TestCase):
|
|||
with self.assertRaises(SyntaxError):
|
||||
self.run_cases_test(input, "")
|
||||
|
||||
def test_kill_in_wrong_order(self):
|
||||
input = """
|
||||
inst(OP, (a, b -- c)) {
|
||||
c = b;
|
||||
PyStackRef_CLOSE(a);
|
||||
PyStackRef_CLOSE(b);
|
||||
}
|
||||
"""
|
||||
with self.assertRaises(SyntaxError):
|
||||
self.run_cases_test(input, "")
|
||||
|
||||
|
||||
class TestGeneratedAbstractCases(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
super().setUp()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue