Skip to content

Commit 7cc8271

Browse files
committed
Fix foreign conversion guard
1 parent 4a06471 commit 7cc8271

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/interop/PForeignToPTypeNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public abstract class PForeignToPTypeNode extends Node {
6060
public abstract Object executeConvert(Object value);
6161

6262
protected static boolean isOtherClass(Class<?> clazz) {
63-
return !(clazz == Byte.class || clazz == Short.class || clazz == Float.class || clazz == Character.class);
63+
return !(clazz == Byte.class || clazz == Short.class || clazz == Float.class || clazz == Character.class || clazz == PException.class);
6464
}
6565

6666
@Specialization(guards = {"value.getClass() == cachedClass", "isOtherClass(cachedClass)"}, limit = "1")

0 commit comments

Comments
 (0)