Files
kotlin/compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt
2018-08-01 12:29:24 +02:00

17 lines
352 B
Kotlin
Vendored

// !LANGUAGE: -NullabilityAssertionOnExtensionReceiver
// TARGET_BACKEND: JVM
// FILE: test.kt
// WITH_RUNTIME
private operator fun A.inc() = A()
fun box(): String {
var aNull = A.n()
aNull++
// NB no exception is thrown in language version 1.1
return "OK"
}
// FILE: A.java
public class A {
public static A n() { return null; }
}