Files
kotlin/compiler/testData/codegen/box/operatorConventions/overloadedSet.kt
2019-11-19 11:00:09 +03:00

12 lines
238 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
object A {
operator fun get(i: Int) = 1
operator fun set(i: Int, j: Int) {}
operator fun set(i: Int, x: Any) { throw Exception() }
}
fun box(): String {
A[0]++
A[0] += 1
return "OK"
}