Skip to content

Commit 58f2b8e

Browse files
committed
Fix: Remove PComplex specialization from PyComplexCheckExactNode.
According to CPython doc `PyComplex_CheckExact` should return true if the argument is a PyComplexObject, but not if its a subtype of PyComplexObject. Accordingly, we shouldn't return true for subtypes of PComplex.
1 parent 1d3ae87 commit 58f2b8e

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyComplexCheckExactNode.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
package com.oracle.graal.python.lib;
4242

4343
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
44-
import com.oracle.graal.python.builtins.objects.complex.PComplex;
4544
import com.oracle.graal.python.nodes.object.IsBuiltinClassProfile;
4645
import com.oracle.truffle.api.dsl.Cached;
4746
import com.oracle.truffle.api.dsl.GenerateUncached;
@@ -55,11 +54,6 @@
5554
public abstract class PyComplexCheckExactNode extends Node {
5655
public abstract boolean execute(Object object);
5756

58-
@Specialization
59-
static boolean doPComplex(PComplex pComplex) {
60-
return true;
61-
}
62-
6357
@Specialization
6458
static boolean doGeneric(Object object,
6559
@Cached IsBuiltinClassProfile isBuiltin) {

0 commit comments

Comments
 (0)