mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
All bytecode text tests are run with stdlib in the classpath and only for JVM backend, therefore directives WITH_RUNTIME, TARGET_BACKEND, IGNORE_BACKEND are not needed
26 lines
494 B
Kotlin
Vendored
26 lines
494 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)
|
|
}
|
|
|
|
// @TestKt.class:
|
|
// 1 NEW TestKt\$test\$1
|
|
// 1 NEW kotlin/jvm/internal/Ref\$IntRef
|
|
// 2 NEW
|
|
// 1 INVOKESPECIAL TestKt\$test\$1.<init>
|
|
// 0 IFNONNULL
|
|
// 0 IFNULL
|
|
// 1 ACONST_NULL
|