Skip to content

Commit 4259908

Browse files
committed
check also for PBuiltinMethod if the underlying function takes a self arg explicitly
1 parent 815f63b commit 4259908

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/special/CallSpecialMethodNode.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ protected static boolean takesSelfArg(Object func) {
121121
if (functionRootNode instanceof BuiltinFunctionRootNode) {
122122
return ((BuiltinFunctionRootNode) functionRootNode).declaresExplicitSelf();
123123
}
124+
} else if (func instanceof PBuiltinMethod) {
125+
return takesSelfArg(((PBuiltinMethod) func).getFunction());
124126
}
125127
return true;
126128
}

0 commit comments

Comments
 (0)