JVM_IR fix cast to non-null primitive type (FIR bootstrap issue)

This commit is contained in:
Dmitry Petrov
2022-01-13 11:03:18 +03:00
committed by Space
parent 2ba0a7b40f
commit d184babda6
11 changed files with 111 additions and 1 deletions
@@ -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"
}