JVM_IR KT-49136 don't optimize null checks on fields and calls
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
abstract class Z {
|
||||
init {
|
||||
check(this)
|
||||
}
|
||||
|
||||
abstract val b: B
|
||||
}
|
||||
|
||||
class A(override val b: B) : Z()
|
||||
|
||||
class B(val c: String)
|
||||
|
||||
fun use(a: Any?) {}
|
||||
|
||||
fun check(z: Z) {
|
||||
use(z?.b?.c)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
A(B(""))
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user