Files
kotlin-fork/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt
T
2018-06-28 12:26:41 +02:00

22 lines
368 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// FILE: test.kt
// WITH_RUNTIME
// LANGUAGE_VERSION: 1.2
import kotlin.test.*
operator fun A.inc() = A()
fun box(): String {
assertFailsWith<IllegalArgumentException> {
var aNull = A.n()
aNull++
}
return "OK"
}
// FILE: A.java
public class A {
public static A n() { return null; }
}