Skip to content

Commit 3b927a2

Browse files
committed
add parse test for lambdas with nested lambdas (when no args are defined)
1 parent c5dff91 commit 3b927a2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_parser.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,12 @@ def x(*, a=None, b):
6363
retval = x(b=42)
6464
""", globs)
6565
assert globs["retval"] == (None, 42)
66+
67+
68+
def test_lambda_no_args_with_nested_lambdas():
69+
no_err = True
70+
try:
71+
eval("lambda: ((lambda args: args[0], ), (lambda args: args[1], ), )")
72+
except Exception as e:
73+
no_err = False
74+
assert no_err

0 commit comments

Comments
 (0)