JVM_IR indy: fix non-null assertions on indy lambda parameters

KT-44278 KT-26060 KT-42621
This commit is contained in:
Dmitry Petrov
2021-02-10 10:10:49 +03:00
parent 43b1711010
commit afeb7e18cd
6 changed files with 57 additions and 1 deletions
@@ -0,0 +1,26 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// SAM_CONVERSIONS: INDY
// FILE: nullabilityAssertions.kt
fun box(): String {
fun justSomeLocalFun() {}
try {
A.bar {}
} catch (e: NullPointerException) {
return "OK"
}
return "Should throw NullPointerException"
}
// FILE: A.java
import org.jetbrains.annotations.NotNull;
public interface A {
void foo(@NotNull String s);
static void bar(A a) {
a.foo(null);
}
}