[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:
committed by
Space Team
parent
0cac6b66d5
commit
1876c8a9ee
+8
@@ -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"
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: s[2, -2]
|
||||
type: kotlin.String
|
||||
Reference in New Issue
Block a user