Skip to content

Commit 09f45d6

Browse files
committed
MethodBuiltins: __name__ missing specialization for builtin methods
1 parent 238cd0c commit 09f45d6

File tree

1 file changed

+5
-0
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/method

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ protected Object doIt(PMethod self,
109109
@Cached("create(__GETATTRIBUTE__)") LookupAndCallBinaryNode getCode) {
110110
return getCode.executeObject(self.getFunction(), SpecialAttributeNames.__NAME__);
111111
}
112+
113+
@Specialization
114+
protected Object doIt(PBuiltinMethod self) {
115+
return self.getName();
116+
}
112117
}
113118

114119
@Builtin(name = SpecialAttributeNames.__CODE__, fixedNumOfArguments = 1, isGetter = true)

0 commit comments

Comments
 (0)