Files
kotlin/compiler/testData/codegen/box/operatorConventions/kt4987.kt

6 lines
166 B
Kotlin
Vendored

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