Files
kotlin-fork/compiler/testData/codegen/box/operatorConventions/kt4987.kt
T
2019-11-19 11:00:09 +03:00

7 lines
196 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
fun box(): String {
operator fun Int?.inc() = (this ?: 0) + 1
var counter: Int? = null
counter++
return if (counter == 1) "OK" else "fail: $counter"
}