Skip to content

Commit 324cb4b

Browse files
committed
missing function creation specialization
1 parent 156c8f9 commit 324cb4b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinConstructors.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,6 +2184,12 @@ public PFunction function(LazyPythonClass cls, PCode code, PDict globals, @Suppr
21842184
return factory().createFunction("<lambda>", getTypeName(cls), code, globals, getClosure(getObjectArrayNode.execute(closure)));
21852185
}
21862186

2187+
@Specialization
2188+
public PFunction function(LazyPythonClass cls, PCode code, PDict globals, @SuppressWarnings("unused") PNone name, @SuppressWarnings("unused") PNone defaultArgs, @SuppressWarnings("unused") PNone closure,
2189+
@Shared("getObjectArrayNode") @Cached GetObjectArrayNode getObjectArrayNode) {
2190+
return factory().createFunction("<lambda>", getTypeName(cls), code, globals, null);
2191+
}
2192+
21872193
@Specialization
21882194
public PFunction function(LazyPythonClass cls, PCode code, PDict globals, String name, @SuppressWarnings("unused") PNone defaultArgs, PTuple closure,
21892195
@Shared("getObjectArrayNode") @Cached GetObjectArrayNode getObjectArrayNode) {

0 commit comments

Comments
 (0)