Skip to content

Commit c5dff91

Browse files
committed
GR-9814: fix lambda def arglist parsing when no args are specified
1 parent 08dfee5 commit c5dff91

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/ScopeTranslator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ public T visitLambdef_nocond_body(Python3Parser.Lambdef_nocond_bodyContext ctx)
155155
@Override
156156
public T visitLambdef(Python3Parser.LambdefContext ctx) {
157157
argListCompilers.push(new ArgListCompiler<>(core));
158-
ctx.accept(argListCompilers.peek());
158+
if (ctx.varargslist() != null) {
159+
ctx.accept(argListCompilers.peek());
160+
}
159161
environment.beginScope(ctx, ScopeKind.Function);
160162
try {
161163
return super.visitLambdef(ctx);

0 commit comments

Comments
 (0)