Skip to content

Commit bc60c9b

Browse files
committed
Add special case for PythonBuiltinClass in GetSuperClassNode
1 parent 51dbf7e commit bc60c9b

File tree

1 file changed

+7
-2
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type

1 file changed

+7
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/TypeNodes.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,17 @@ public abstract static class GetSuperClassNode extends Node {
472472
public abstract Object execute(Object obj);
473473

474474
@Specialization
475-
static Object doManaged(PythonManagedClass obj) {
475+
static Object doPythonClass(PythonClass obj) {
476476
return obj.getSuperClass();
477477
}
478478

479479
@Specialization
480-
static Object doBuiltin(PythonBuiltinClassType obj) {
480+
static Object doBuiltin(PythonBuiltinClass obj) {
481+
return obj.getType().getBase();
482+
}
483+
484+
@Specialization
485+
static Object doBuiltinType(PythonBuiltinClassType obj) {
481486
return obj.getBase();
482487
}
483488

0 commit comments

Comments
 (0)