diff options
author | penguin_wwy <940375606@qq.com> | 2023-02-16 11:31:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-16 11:31:41 (GMT) |
commit | df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d (patch) | |
tree | a63d96a288cb93b5281a6434f4b4b25b2c4ec926 /Lib/test/test_compile.py | |
parent | 0b13575e74ff3321364a3389eda6b4e92792afe1 (diff) | |
download | cpython-df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d.zip cpython-df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d.tar.gz cpython-df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d.tar.bz2 |
gh-101928: fix crash in compiler on multi-line lambda in function call (#101933)
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r-- | Lib/test/test_compile.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 90b067b..a77742c 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -1155,6 +1155,17 @@ if 1: with self.subTest(expr=expr): compile(expr, "<single>", "exec") + def test_multi_line_lambda_as_argument(self): + # See gh-101928 + compile(""" +def foo(param, lambda_exp): + pass + +foo(param=0, + lambda_exp=lambda: + 1) + """, "<test>", "exec") + @requires_debug_ranges() class TestSourcePositions(unittest.TestCase): |