Skip to content

Commit 7571410

Browse files
committed
Fix: 'AbstractMethodBuiltins.CallNode' didn't overwrite 'varArgsExecute'.
1 parent 657bbab commit 7571410

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/method/AbstractMethodBuiltins.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
6161
import com.oracle.truffle.api.dsl.NodeFactory;
6262
import com.oracle.truffle.api.dsl.Specialization;
63+
import com.oracle.truffle.api.frame.VirtualFrame;
6364

6465
@CoreFunctions(extendClasses = {PythonBuiltinClassType.PMethod, PythonBuiltinClassType.PBuiltinMethod})
6566
public class AbstractMethodBuiltins extends PythonBuiltins {
@@ -84,6 +85,13 @@ protected Object doIt(PMethod self, Object[] arguments, PKeyword[] keywords) {
8485
protected Object doIt(PBuiltinMethod self, Object[] arguments, PKeyword[] keywords) {
8586
return dispatch.executeCall(null, self.getFunction(), createArgs.executeWithSelf(self.getSelf(), arguments), keywords);
8687
}
88+
89+
@Override
90+
public Object varArgExecute(VirtualFrame frame, Object[] arguments, PKeyword[] keywords) throws VarargsBuiltinDirectInvocationNotSupported {
91+
Object[] argsWithoutSelf = new Object[arguments.length - 1];
92+
System.arraycopy(arguments, 1, argsWithoutSelf, 0, argsWithoutSelf.length);
93+
return execute(frame, arguments[0], argsWithoutSelf, keywords);
94+
}
8795
}
8896

8997
@Builtin(name = __SELF__, fixedNumOfPositionalArgs = 1, isGetter = true)

0 commit comments

Comments
 (0)