Files
kotlin/compiler/testData/codegen/bytecodeText/nullCheckOptimization/expressionValueIsNotNull.kt
2020-02-18 22:51:29 +03:00

25 lines
395 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// TODO KT-36813 Support code generated by JVM_IR in redundant null check optimization
// FILE: j/J.java
package j;
public class J {
public static final String ok() { return "OK"; }
}
// FILE: k.kt
import j.J
fun foo(a: Any) {}
fun test() {
val a = J.ok()
foo(a)
if (a == null) foo("NULL-1")
}
// @KKt.class:
// 0 IFNULL
// 0 IFNONNULL
// 0 NULL-1