JVM_IR fix cast to non-null primitive type (FIR bootstrap issue)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class C(val value: Any)
|
||||
|
||||
fun box(): String {
|
||||
val c1 = C(-0.0)
|
||||
val c2 = C(0.toByte())
|
||||
val cmp = (c1.value as Double).compareTo(c2.value as Byte)
|
||||
if (cmp != -1) return "Failed: cmp=$cmp"
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class C(val value: Any)
|
||||
|
||||
fun box(): String {
|
||||
val c1 = C(1.1)
|
||||
val c2 = C(1)
|
||||
val cmp = (c1.value as Double).compareTo(c2.value as Int)
|
||||
if (cmp != 1) return "Failed: cmp=$cmp"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user