[LL] retrieve fir from generated property of desugaring ++ operator

^ KTIJ-24385
Temp property to store receiver is generated for `a.b++` expression.
If this property's psi corresponds to receiver expr, then FirProperty
would be found by mapper if receiver is requested.
It works unexpectedly, because FirProperty is normally not expected by expression.
This change set fake sources for generated FirProperty, so it won't be found
by source psi
This commit is contained in:
Anna Kozlova
2023-01-24 15:46:44 +01:00
committed by teamcity
parent 3aade8ad95
commit b026678a34
12 changed files with 114 additions and 2 deletions
@@ -0,0 +1,10 @@
// IGNORE_FE10
class F {
val a = arrayOf(1, 2)
fun handleLeftBracketInFragment() {
foo().<expr>peek()</expr>.a[0]++
}
fun foo() : F = F()
fun peek() : F = this
}
@@ -0,0 +1,17 @@
KtSuccessCallInfo:
call = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = foo()
isSafeNavigation = false
type = F
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = F
symbol = /F.peek(<dispatch receiver>: F): F
valueParameters = []
callableIdIfNonLocal = /F.peek
typeArgumentsMapping = {}
argumentMapping = {}
@@ -0,0 +1,10 @@
// IGNORE_FE10
class F {
var a = 1
fun handleLeftBracketInFragment() {
foo().<expr>peek()</expr>.a++
}
fun foo() : F = F()
fun peek() : F = this
}
@@ -0,0 +1,17 @@
KtSuccessCallInfo:
call = KtSimpleFunctionCall:
isImplicitInvoke = false
partiallyAppliedSymbol = KtPartiallyAppliedSymbol:
dispatchReceiver = KtExplicitReceiverValue:
expression = foo()
isSafeNavigation = false
type = F
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
returnType = F
symbol = /F.peek(<dispatch receiver>: F): F
valueParameters = []
callableIdIfNonLocal = /F.peek
typeArgumentsMapping = {}
argumentMapping = {}