JVM_IR KT-44993 preserve inner expression type when fusing if-null

This commit is contained in:
Dmitry Petrov
2021-03-16 11:15:18 +03:00
committed by TeamCityServer
parent 922419efb8
commit decfaa3ba5
10 changed files with 140 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: kt44993.kt
fun box(): String =
f(KotlinBox(JavaBox()))
fun f(r: KotlinBox<JavaBox>): String =
r?.data?.element!!
class KotlinBox<T>(@JvmField val data: T?)
// FILE: JavaBox.java
public class JavaBox {
public final String element = "OK";
}