JVM_IR indy: fix non-null assertions on indy lambda parameters
KT-44278 KT-26060 KT-42621
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user