Skip to content

Commit 7fef1c6

Browse files
committed
[GR-24002] UnsupportedSpecializationException: Unexpected values provided for OrdNode
1 parent b45fad8 commit 7fef1c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,11 @@ public int ord(String chr) {
14081408
return chr.charAt(0);
14091409
}
14101410

1411+
@Specialization
1412+
public int ord(PString chr) {
1413+
return ord(chr.getValue());
1414+
}
1415+
14111416
@Specialization
14121417
public int ord(VirtualFrame frame, PIBytesLike chr,
14131418
@Cached("create()") SequenceStorageNodes.LenNode lenNode,

0 commit comments

Comments
 (0)