Skip to content

Commit 44c8241

Browse files
committed
declare None, floats, ints, and booleans not as interop objects, but as primitives
1 parent 3ec9e53 commit 44c8241

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

graalpython/com.oracle.graal.python.tck/src/com/oracle/graal/python/tck/PythonProvider.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ public class PythonProvider implements LanguageProvider {
8282

8383
private static final String ID = "python";
8484

85-
private static final TypeDescriptor INT = intersection(OBJECT, NUMBER);
86-
// as per interop contract, we cannot be boolean and number at the same time
87-
private static final TypeDescriptor BOOL = intersection(OBJECT, BOOLEAN);
88-
private static final TypeDescriptor FLOAT = intersection(OBJECT, NUMBER);
85+
private static final TypeDescriptor INT = NUMBER;
86+
// as per interop contract, we cannot be boolean and number at the same time, so it's only a boolean
87+
private static final TypeDescriptor BOOL = BOOLEAN;
88+
private static final TypeDescriptor FLOAT = NUMBER;
8989
private static final TypeDescriptor COMPLEX = intersection(OBJECT);
90-
private static final TypeDescriptor NONE = intersection(OBJECT, NULL);
90+
private static final TypeDescriptor NONE = NULL;
9191
private static final TypeDescriptor STR = intersection(OBJECT, STRING, ITERABLE, array(STRING));
9292
private static final TypeDescriptor BYTES = intersection(OBJECT, ITERABLE, array(INT));
9393
private static final TypeDescriptor BYTEARRAY = intersection(OBJECT, ITERABLE, array(INT));

0 commit comments

Comments
 (0)