[AA] Fix getKtExpressionType for augmented array assignment

This previously worked on accident because the get call in an
augmented array assignment wouldn't have a resolved argument list, and
so `argumentsToSubstitutedValueParameters` would return null.
Now, we additionally verify that we're in a `set` call.

#KT-66124
This commit is contained in:
Kirill Rakhman
2024-03-11 11:08:21 +01:00
committed by Space Team
parent 0cac6b66d5
commit 1876c8a9ee
7 changed files with 37 additions and 1 deletions
@@ -0,0 +1,8 @@
operator fun Array<String>.get(index1: Int, index2: Int) = this[index1 + index2]
operator fun Array<String>.set(index1: Int, index2: Int, elem: String) {
this[index1 + index2] = elem
}
fun test(s: Array<String>) {
<expr>s[2, -2]</expr> += "K"
}
@@ -0,0 +1,2 @@
expression: s[2, -2]
type: kotlin.String