Files
kotlin-fork/compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt
T
Dmitry Petrov 052f6929c9 JVM_IR indy SAM conversions: update tests
KT-44278 KT-26060 KT-42621
2021-02-12 16:52:30 +03:00

35 lines
615 B
Kotlin
Vendored

// FILE: JFoo.java
import org.jetbrains.annotations.Nullable;
public class JFoo {
public static void foo2(@Nullable Runnable h1, @Nullable Runnable h2) {
if (h2 != null) throw new AssertionError();
h1.run();
}
}
// FILE: Test.kt
fun test() {
var i = 0
JFoo.foo2({ i++ }, null)
}
// JVM_TEMPLATES:
// @TestKt.class:
// 1 NEW TestKt\$
// 1 NEW kotlin/jvm/internal/Ref\$IntRef
// 2 NEW
// 0 IFNONNULL
// 0 IFNULL
// 1 ACONST_NULL
// JVM_IR_TEMPLATES:
// @TestKt.class:
// 0 NEW TestKt\$
// 1 NEW kotlin/jvm/internal/Ref\$IntRef
// 1 NEW
// 0 IFNONNULL
// 0 IFNULL
// 1 ACONST_NULL