FIR IDE: introduce KtFirArrayAccessReference
This commit is contained in:
@@ -1790,16 +1790,17 @@ class RawFirBuilder(
|
||||
if (getArgument != null) {
|
||||
calleeReference = buildSimpleNamedReference {
|
||||
source = expression.parent.toFirSourceElement()
|
||||
this.source = source
|
||||
this.source = source.fakeElement(FirFakeSourceElementKind.ArrayAccessNameReference)
|
||||
name = OperatorNameConventions.SET
|
||||
}
|
||||
} else {
|
||||
source = expression.toFirSourceElement()
|
||||
calleeReference = buildSimpleNamedReference {
|
||||
this.source = source
|
||||
this.source = source.fakeElement(FirFakeSourceElementKind.ArrayAccessNameReference)
|
||||
name = OperatorNameConventions.GET
|
||||
}
|
||||
}
|
||||
this.source = source
|
||||
explicitReceiver = arrayExpression.toFirExpression("No array expression")
|
||||
argumentList = buildArgumentList {
|
||||
for (indexExpression in expression.indexExpressions) {
|
||||
|
||||
@@ -139,6 +139,9 @@ sealed class FirFakeSourceElementKind : FirSourceElementKind() {
|
||||
// where `val $subj = a` has a fake source
|
||||
object WhenGeneratedSubject : FirFakeSourceElementKind()
|
||||
|
||||
// list[0] -> list.get(0) where name reference will have a fake source element
|
||||
object ArrayAccessNameReference : FirFakeSourceElementKind()
|
||||
|
||||
// super.foo() --> super<Supertype>.foo()
|
||||
// where `Supertype` has a fake source
|
||||
object SuperCallImplicitType : FirFakeSourceElementKind()
|
||||
|
||||
Reference in New Issue
Block a user