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

13 lines
234 B
Kotlin

object Map1 {
operator fun get(i: Int, j: Int) = Map2
}
object Map2 {
operator fun get(i: Int, j: Int) = 0
operator fun set(i: Int, j: Int, newValue: Int) {}
}
fun box(): String {
Map1[0, 0][0, 0]++
return "OK"
}