mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 00:21:28 +00:00
17 lines
352 B
Kotlin
Vendored
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; }
|
|
} |