[AA] resolve array access expression to corresponding set operator

k1 would suggest `get` as well
 but with current fir structure with fake desugaring
 get is moved to the separate fake psi which doesn't exist
 thus the problem is ignored for now
 ^ KTIJ-24025
This commit is contained in:
Anna Kozlova
2022-12-19 23:18:33 +01:00
committed by teamcity
parent c44993e586
commit b81c210535
14 changed files with 116 additions and 4 deletions
@@ -0,0 +1,12 @@
package test
class B(val n: Int) {
operator fun set(i: Int, a: B) {}
operator fun get(i: Int) : B {}
operator fun inc() : B {}
}
fun test() {
var a = B(1)
<expr>a[2]</expr>++
}
@@ -0,0 +1,6 @@
KT element: KtArrayAccessExpression
FIR element: FirResolvedNamedReferenceImpl
FIR source kind: KtRealSourceElementKind
FIR element rendered:
R|test/B.set|