Files
kotlin-fork/backend.native/tests/external/codegen/box/operatorConventions/kt4987.kt
T
2017-03-13 15:31:46 +03:00

6 lines
166 B
Kotlin

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