FIR: Ensure that the array set argument (on RHS of =) is always mapped
to the last parameter of the set operator function, even if there are missing or too many index arguments.
This commit is contained in:
committed by
teamcityserver
parent
2bb3e94ef7
commit
34e6459014
+10
@@ -0,0 +1,10 @@
|
||||
// !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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user