mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
15 lines
283 B
Kotlin
Vendored
15 lines
283 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
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"
|
|
}
|
|
}
|