Files
kotlin-fork/compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/memberExtOnLong.kt
T
2016-03-02 14:28:06 +03:00

12 lines
265 B
Kotlin
Vendored

object ExtProvider {
operator fun Long.get(i: Int) = this
operator fun Long.set(i: Int, newValue: Long) {}
}
fun box(): String {
with (ExtProvider) {
var x = 0L
val y = x[0]++
return if (y == 0L) "OK" else "Failed, y=$y"
}
}