Files
kotlin/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
Alexander Udalov 8fe964f269 Resolve array access RHS always as the last argument of the call
Also do not attempt to match any of the arguments in the brackets with the last
parameter of the 'set' method

 #KT-10633 Fixed
2016-01-21 00:36:35 +03:00

11 lines
203 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
operator fun get(x: Int) {}
operator fun set(x: String, value: Int) {}
fun d(x: Int) {
this["", <!TOO_MANY_ARGUMENTS!>1<!>] = 1
}
}