Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt10633.fir.kt
T

20 lines
259 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
var count = 0
operator fun Int.get(s: Int): Int {
count++
return this + s
}
operator fun Int.set(s: Int, x: String = "", z: Int) {
}
fun main() {
1[2] = 1
1.set(2, z = 1)
1[2] += 1
1.set(2, 1)
}