Files
kotlin-fork/compiler/testData/codegen/box/increment/extOnLong.kt
T
2018-06-09 19:15:38 +03:00

9 lines
216 B
Kotlin
Vendored

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