Skip to content

Commit 936c18f

Browse files
committed
Booleans are not assignable to int/long storages
1 parent 1009f0c commit 936c18f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/common/SequenceStorageNodes.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,11 @@ static boolean compatibleAssign(Node inliningTarget, SequenceStorage lhs, Sequen
190190
case Boolean:
191191
return rhsType == Boolean || rhsType == Uninitialized || rhsType == Empty;
192192
case Byte:
193-
return rhsType == Boolean || rhsType == Byte || rhsType == Uninitialized || rhsType == Empty;
193+
return rhsType == Byte || rhsType == Uninitialized || rhsType == Empty;
194194
case Int:
195-
return rhsType == Boolean || rhsType == StorageType.Byte || rhsType == StorageType.Int || rhsType == Uninitialized || rhsType == Empty;
195+
return rhsType == StorageType.Byte || rhsType == StorageType.Int || rhsType == Uninitialized || rhsType == Empty;
196196
case Long:
197-
return rhsType == Boolean || rhsType == Byte || rhsType == Int || rhsType == Long || rhsType == Uninitialized || rhsType == Empty;
197+
return rhsType == Byte || rhsType == Int || rhsType == Long || rhsType == Uninitialized || rhsType == Empty;
198198
case Double:
199199
return rhsType == Double || rhsType == Uninitialized || rhsType == Empty;
200200
case Generic:

0 commit comments

Comments
 (0)