[FIR] Fix specificity comparision for unsigned integers
This commit is contained in:
+16
@@ -69,9 +69,17 @@ abstract class AbstractConeCallConflictResolver(
|
||||
val byte = StandardClassIds.Byte
|
||||
val short = StandardClassIds.Short
|
||||
|
||||
val uInt = StandardClassIds.UInt
|
||||
val uLong = StandardClassIds.ULong
|
||||
val uByte = StandardClassIds.UByte
|
||||
val uShort = StandardClassIds.UShort
|
||||
|
||||
val specificClassId = specific.classId ?: return false
|
||||
val generalClassId = general.classId ?: return false
|
||||
|
||||
|
||||
// int >= long, int >= short, short >= byte
|
||||
|
||||
when {
|
||||
//TypeUtils.equalTypes(specific, _double) && TypeUtils.equalTypes(general, _float) -> return true
|
||||
specificClassId == int -> {
|
||||
@@ -82,6 +90,14 @@ abstract class AbstractConeCallConflictResolver(
|
||||
}
|
||||
}
|
||||
specificClassId == short && generalClassId == byte -> return true
|
||||
specificClassId == uInt -> {
|
||||
when {
|
||||
generalClassId == uLong -> return true
|
||||
generalClassId == uByte -> return true
|
||||
generalClassId == uShort -> return true
|
||||
}
|
||||
}
|
||||
specificClassId == uShort && generalClassId == uByte -> return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun testBreak() {
|
||||
for (i in 0..1) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// WITH_RUNTIME
|
||||
// KJS_WITH_FULL_RUNTIME
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
fun testContinue() {
|
||||
for (i in 0..1) {
|
||||
|
||||
Reference in New Issue
Block a user