[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:
Vendored
+10
@@ -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
|
||||
}
|
||||
Vendored
+17
@@ -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 = {}
|
||||
+10
@@ -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
|
||||
}
|
||||
+17
@@ -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 = {}
|
||||
Reference in New Issue
Block a user