Files
kotlin/compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver.kt
Alexander Udalov bf06d381b9 Minor, move old Java nullability assertion tests under oldLanguageVersions/
Also drop the (now confusing) "_lv12" suffix from newer tests
2019-11-21 13:46:17 +01:00

23 lines
405 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: test.kt
import kotlin.test.*
class C {
fun test() { J.s().memberExtension() }
fun String.memberExtension() {}
}
fun box(): String {
assertFailsWith<IllegalStateException> { C().test() }
return "OK"
}
// FILE: J.java
public class J {
public static String s() { return null; }
}