Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt10633.fir.kt
T
Dmitriy Novozhilov df47581c5a [FIR] Consider call site in argument mapping handling for set operator call
^KT-56542 Fixed
^KT-56714 Fixed
2023-02-28 09:17:40 +00:00

20 lines
288 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, <!NO_VALUE_FOR_PARAMETER!>1)<!>
}