Skip to content

Commit a27d489

Browse files
committed
fix getting closure for GeneratorFunctionDefinitionNode
1 parent 7b8ce08 commit a27d489

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/function/GeneratorFunctionDefinitionNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public PGeneratorFunction execute(VirtualFrame frame) {
8686
kwDefaultValues[i] = new PKeyword(kwDefaults[i].name, kwDefaults[i].execute(frame));
8787
}
8888
}
89-
PCell[] closure = getClosureFromLocals(frame);
89+
PCell[] closure = getClosureFromGeneratorOrFunctionLocals(frame);
9090
return withDocString(frame, factory().createGeneratorFunction(functionName, enclosingClassName, getGeneratorCallTarget(), PArguments.getGlobals(frame), closure, defaultValues,
9191
kwDefaultValues));
9292
}

0 commit comments

Comments
 (0)