[Analysis API] Add type to KtReceiverValue

Maybe in the future we could remove type from the
KtImplicitReceiverValue, because it has ktSymbol, and in theory
that should be enough to create corresponding KtType.
Unfortunately that is not the case for KtClassOrObjectSymbol --
it doesn't have the API for "default" type creation currently.

Regarding code in KtFirCallResolver.kt -- it seems like code there
needs some love in the future. Psi created via custom code there,
because for call x() FIR has receiver x with psi = null
This commit is contained in:
Stanislav Erokhin
2022-06-14 12:10:54 +02:00
committed by teamcity
parent 409d959816
commit 8d8fc6e291
131 changed files with 216 additions and 28 deletions
@@ -475,15 +475,16 @@ internal class KtFe10CallResolver(
resolvedCall: ResolvedCall<*>,
smartCastType: KotlinType? = null
): KtReceiverValue? {
val ktType = type.toKtType(analysisContext)
val result = when (this) {
is ExpressionReceiver -> expression.toExplicitReceiverValue()
is ExpressionReceiver -> expression.toExplicitReceiverValue(ktType)
is ExtensionReceiver -> {
val extensionReceiverParameter = this.declarationDescriptor.extensionReceiverParameter ?: return null
KtImplicitReceiverValue(KtFe10ReceiverParameterSymbol(extensionReceiverParameter, analysisContext))
KtImplicitReceiverValue(KtFe10ReceiverParameterSymbol(extensionReceiverParameter, analysisContext), ktType)
}
is ImplicitReceiver -> {
val symbol = this.declarationDescriptor.toKtSymbol(analysisContext) ?: return null
KtImplicitReceiverValue(symbol)
KtImplicitReceiverValue(symbol, ktType)
}
else -> null
}
@@ -308,16 +308,16 @@ internal class KtFirCallResolver(
explicitReceiverKind: ExplicitReceiverKind
): KtPartiallyAppliedSymbol<KtCallableSymbol, KtCallableSignature<KtCallableSymbol>> {
isImplicitInvoke = true
// For implicit invoke, the explicit receiver is always set in FIR and this receiver is the variable or property that has
// the `invoke` member function. In this case, we use the `calleeExpression` in the `KtCallExpression` as the PSI
// representation of this receiver. Caller can then use this PSI for further call resolution, which is implemented by the
// parameter `resolveCalleeExpressionOfFunctionCall` in `toKtCallInfo`.
val explicitReceiverPsi = when (psi) {
is KtQualifiedExpression -> (psi.selectorExpression as KtCallExpression).calleeExpression
is KtCallExpression -> psi.calleeExpression
else -> error("unexpected PSI $psi for FirImplicitInvokeCall")
} ?: error("missing calleeExpression in PSI $psi for FirImplicitInvokeCall")
// For implicit invoke, the explicit receiver is always set in FIR and this receiver is the variable or property that has
// the `invoke` member function. In this case, we use the `calleeExpression` in the `KtCallExpression` as the PSI
// representation of this receiver. Caller can then use this PSI for further call resolution, which is implemented by the
// parameter `resolveCalleeExpressionOfFunctionCall` in `toKtCallInfo`.
val explicitReceiverValue = KtExplicitReceiverValue(explicitReceiverPsi, false, token)
// Specially handle @ExtensionFunctionType
if (dispatchReceiver.typeRef.coneTypeSafe<ConeKotlinType>()?.isExtensionFunctionType == true) {
@@ -327,7 +327,7 @@ internal class KtFirCallResolver(
val dispatchReceiverValue: KtReceiverValue?
val extensionReceiverValue: KtReceiverValue?
if (explicitReceiverKind == ExplicitReceiverKind.DISPATCH_RECEIVER) {
dispatchReceiverValue = explicitReceiverValue
dispatchReceiverValue = KtExplicitReceiverValue(explicitReceiverPsi, dispatchReceiver.typeRef.coneType.asKtType(), false, token)
if (firstArgIsExtensionReceiver) {
extensionReceiverValue = (fir as FirFunctionCall).arguments.first().toKtReceiverValue()
} else {
@@ -335,7 +335,7 @@ internal class KtFirCallResolver(
}
} else {
dispatchReceiverValue = dispatchReceiver.toKtReceiverValue()
extensionReceiverValue = explicitReceiverValue
extensionReceiverValue = KtExplicitReceiverValue(explicitReceiverPsi, extensionReceiver.typeRef.coneType.asKtType(), false, token)
}
return KtPartiallyAppliedSymbol(
with(analysisSession) { unsubstitutedKtSignature.substitute(substitutor) },
@@ -640,12 +640,12 @@ internal class KtFirCallResolver(
(calleeReference as? FirResolvedNamedReference)?.resolvedSymbol as? FirNamedFunctionSymbol ?: return null
val substitutor = createConeSubstitutorFromTypeArguments() ?: return null
val dispatchReceiverValue = if (explicitReceiverPsiSupplement != null && explicitReceiver == dispatchReceiver) {
explicitReceiverPsiSupplement.toExplicitReceiverValue()
explicitReceiverPsiSupplement.toExplicitReceiverValue(dispatchReceiver.typeRef.coneType.asKtType())
} else {
dispatchReceiver.toKtReceiverValue()
}
val extensionReceiverValue = if (explicitReceiverPsiSupplement != null && explicitReceiver == extensionReceiver) {
explicitReceiverPsiSupplement.toExplicitReceiverValue()
explicitReceiverPsiSupplement.toExplicitReceiverValue(extensionReceiver.typeRef.coneType.asKtType())
} else {
extensionReceiver.toKtReceiverValue()
}
@@ -677,15 +677,15 @@ internal class KtFirCallResolver(
?: return null
else -> return null
}
KtImplicitReceiverValue(implicitPartiallyAppliedSymbol)
KtImplicitReceiverValue(implicitPartiallyAppliedSymbol, typeRef.coneType.asKtType())
} else {
if (psi !is KtExpression) return null
psi.toExplicitReceiverValue()
psi.toExplicitReceiverValue(typeRef.coneType.asKtType())
}
}
else -> {
if (psi !is KtExpression) return null
psi.toExplicitReceiverValue()
psi.toExplicitReceiverValue(typeRef.coneType.asKtType())
}
}
}
@@ -919,14 +919,16 @@ internal class KtFirCallResolver(
val equalsSymbolInAny = equalsSymbolInAny
val leftOperand = arguments.firstOrNull() ?: return null
val session = analysisSession.useSiteSession
val classSymbol = leftOperand.typeRef.coneType.fullyExpandedType(session).toSymbol(session) as? FirClassSymbol<*>
val leftOperandType = leftOperand.typeRef.coneType
val classSymbol = leftOperandType.fullyExpandedType(session).toSymbol(session) as? FirClassSymbol<*>
val equalsSymbol = classSymbol?.getEqualsSymbol(equalsSymbolInAny) ?: equalsSymbolInAny
val ktSignature = equalsSymbol.toKtSignature()
KtSuccessCallInfo(
KtSimpleFunctionCall(
KtPartiallyAppliedSymbol(
ktSignature,
KtExplicitReceiverValue(leftPsi, false, token),
KtExplicitReceiverValue(leftPsi, leftOperandType.asKtType(), false, token),
null
),
LinkedHashMap<KtExpression, KtVariableLikeSignature<KtValueParameterSymbol>>().apply {
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.analysis.api.calls.KtCompoundAccess
import org.jetbrains.kotlin.analysis.api.calls.KtExplicitReceiverValue
import org.jetbrains.kotlin.analysis.api.components.KtCallResolver
import org.jetbrains.kotlin.analysis.api.impl.barebone.parentOfType
import org.jetbrains.kotlin.analysis.api.types.KtType
import org.jetbrains.kotlin.lexer.KtSingleValueToken
import org.jetbrains.kotlin.lexer.KtTokens
import org.jetbrains.kotlin.psi.*
@@ -36,8 +37,8 @@ abstract class AbstractKtCallResolver : KtCallResolver() {
return incOrDecOperationKind
}
protected fun KtExpression.toExplicitReceiverValue(): KtExplicitReceiverValue =
KtExplicitReceiverValue(this, isReceiverOfKtSafeQualifiedExpression(), token)
protected fun KtExpression.toExplicitReceiverValue(type: KtType): KtExplicitReceiverValue =
KtExplicitReceiverValue(this, type, isReceiverOfKtSafeQualifiedExpression(), token)
private fun KtExpression.isReceiverOfKtSafeQualifiedExpression(): Boolean {
val safeQualifiedExpression = parentOfType<KtSafeQualifiedExpression>() ?: return false
@@ -492,7 +492,16 @@ public sealed class KtCompoundAccess(private val _operationPartiallyAppliedSymbo
/**
* A receiver value of a call.
*/
public sealed class KtReceiverValue : KtLifetimeOwner
public sealed class KtReceiverValue : KtLifetimeOwner {
/**
* Returns inferred [KtType] of the receiver.
*
* In case of smart cast on the receiver returns smart cast type.
*
* For builder inference in FIR implementation it currently works incorrectly, see KT-50916.
*/
public abstract val type: KtType
}
/**
* An explicit expression receiver. For example
@@ -502,8 +511,9 @@ public sealed class KtReceiverValue : KtLifetimeOwner
*/
public class KtExplicitReceiverValue(
private val _expression: KtExpression,
private val _type: KtType,
private val _isSafeNavigation: Boolean,
override val token: KtLifetimeToken
override val token: KtLifetimeToken,
) : KtReceiverValue() {
public val expression: KtExpression get() = withValidityAssertion { _expression }
@@ -517,6 +527,8 @@ public class KtExplicitReceiverValue(
* ```
*/
public val isSafeNavigation: Boolean get() = withValidityAssertion { _isSafeNavigation }
override val type: KtType get() = withValidityAssertion { _type }
}
/**
@@ -534,9 +546,14 @@ public class KtExplicitReceiverValue(
* }
* ```
*/
public class KtImplicitReceiverValue(private val _symbol: KtSymbol) : KtReceiverValue() {
public class KtImplicitReceiverValue(
private val _symbol: KtSymbol,
private val _type: KtType
) : KtReceiverValue() {
override val token: KtLifetimeToken get() = _symbol.token
public val symbol: KtSymbol get() = withValidityAssertion { _symbol }
override val type: KtType get() = withValidityAssertion { _type }
}
/**
@@ -553,5 +570,5 @@ public class KtSmartCastedReceiverValue(private val _original: KtReceiverValue,
override val token: KtLifetimeToken
get() = _original.token
public val original: KtReceiverValue get() = withValidityAssertion { _original }
public val smartCastType: KtType get() = withValidityAssertion { _smartCastType }
public override val type: KtType get() = withValidityAssertion { _smartCastType }
}
@@ -7,6 +7,7 @@ KtErrorCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -28,6 +29,7 @@ KtErrorCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -7,6 +7,7 @@ KtErrorCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -28,6 +29,7 @@ KtErrorCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: test/Target<kotlin/String>
type = test.Target<kotlin.String>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: test/Target<kotlin/String>
type = test.Target<kotlin.String>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = l
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -25,6 +26,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -46,6 +48,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -25,6 +26,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -63,9 +65,11 @@ KtSuccessCallInfo:
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
type = Foo
extensionReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
signature = KtFunctionLikeSignature:
receiverType = MyMap<kotlin.String, kotlin.Int>
returnType = kotlin.Unit
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, A>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Long
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()
isSafeNavigation = false
type = kotlin.Long
signature = KtFunctionLikeSignature:
receiverType = kotlin.Long
returnType = kotlin.Double
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()()
isSafeNavigation = false
type = kotlin.Double
signature = KtFunctionLikeSignature:
receiverType = kotlin.Double
returnType = kotlin.Unit
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = b1
isSafeNavigation = false
type = B
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = b1
isSafeNavigation = false
type = B
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = a1
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = "str"
isSafeNavigation = false
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit
@@ -5,9 +5,11 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = kotlin.Function1<kotlin.String, kotlin.Unit>
extensionReceiver = KtExplicitReceiverValue:
expression = ""
isSafeNavigation = false
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit
@@ -5,9 +5,11 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = @ExtensionFunctionType kotlin.Function1<kotlin.String, kotlin.Unit>
extensionReceiver = KtExplicitReceiverValue:
expression = ""
isSafeNavigation = false
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Unit
@@ -5,9 +5,11 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = kotlin.Function1<kotlin.String, kotlin.Unit>
extensionReceiver = KtExplicitReceiverValue:
expression = ""
isSafeNavigation = false
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit
@@ -5,9 +5,11 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = @ExtensionFunctionType kotlin.Function1<kotlin.String, kotlin.Unit>
extensionReceiver = KtExplicitReceiverValue:
expression = ""
isSafeNavigation = false
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = null
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = "str"
isSafeNavigation = false
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = "str"
isSafeNavigation = true
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = c
isSafeNavigation = false
type = C
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtErrorCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = c
isSafeNavigation = false
type = C
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtErrorCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = c
isSafeNavigation = false
type = C
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtErrorCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = c
isSafeNavigation = false
type = C
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = c
isSafeNavigation = false
type = C
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtErrorCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = c
isSafeNavigation = false
type = C
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtErrorCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = c
isSafeNavigation = false
type = C
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtErrorCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = c
isSafeNavigation = false
type = C
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = javaClass
isSafeNavigation = false
type = JavaClass
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -4,6 +4,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = javaClass
isSafeNavigation = false
type = JavaClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = foo
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: JavaClass
type = JavaClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = foo
@@ -4,6 +4,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = javaClass
isSafeNavigation = false
type = JavaClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = sub
@@ -4,6 +4,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = javaClass
isSafeNavigation = false
type = JavaClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = foo
@@ -4,6 +4,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = javaClass
isSafeNavigation = false
type = JavaClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = foo
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: JavaClass
type = JavaClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = foo
@@ -4,6 +4,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = ktClass
isSafeNavigation = false
type = KtClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = foo
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: A
type = A
extensionReceiver = null
signature = KtVariableLikeSignature:
name = i
@@ -4,6 +4,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = ktClass
isSafeNavigation = false
type = KtClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = instance
@@ -4,6 +4,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = ktClass
isSafeNavigation = false
type = KtClass
extensionReceiver = null
signature = KtVariableLikeSignature:
name = foo
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: A
type = A
extensionReceiver = null
signature = KtVariableLikeSignature:
name = i
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = a
isSafeNavigation = false
type = A<kotlin.String>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -18,6 +19,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -39,6 +41,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -18,6 +19,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -56,9 +58,11 @@ KtSuccessCallInfo:
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
type = Foo
extensionReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
signature = KtFunctionLikeSignature:
receiverType = MyMap<kotlin.String, kotlin.Int>
returnType = kotlin.Unit
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -18,6 +19,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -39,6 +41,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m["a"]
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -18,6 +19,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -56,9 +58,11 @@ KtSuccessCallInfo:
symbolKind: TOP_LEVEL
typeParameters: []
visibility: Public
type = Foo
extensionReceiver = KtExplicitReceiverValue:
expression = m
isSafeNavigation = false
type = MyMap<kotlin.String, kotlin.Int>
signature = KtFunctionLikeSignature:
receiverType = MyMap<kotlin.String, kotlin.Int>
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtErrorCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = a
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtErrorCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = a
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -4,6 +4,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = a
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtVariableLikeSignature:
name = f
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = 1
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Int
@@ -5,7 +5,8 @@ KtSuccessCallInfo:
original = KtExplicitReceiverValue:
expression = a
isSafeNavigation = false
smartCastType = kotlin.String
type = kotlin.Any
type = kotlin.String
extensionReceiver = null
signature = KtVariableLikeSignature:
name = length
@@ -7,7 +7,8 @@ KtSuccessCallInfo:
original = KtExplicitReceiverValue:
expression = a
isSafeNavigation = false
smartCastType = kotlin.String
type = kotlin.Any
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit
@@ -6,7 +6,8 @@ KtSuccessCallInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: kotlin/Any
smartCastType = kotlin.String
type = kotlin.Any
type = kotlin.String
extensionReceiver = null
signature = KtVariableLikeSignature:
name = length
@@ -8,7 +8,8 @@ KtSuccessCallInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: kotlin/Any
smartCastType = kotlin.String
type = kotlin.Any
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function1<kotlin.Int, kotlin.String>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.String
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function2<@R|kotlin.ParameterName|(name = String(a)) kotlin.Int, @R|kotlin.ParameterName|(name = String(b)) kotlin.String, kotlin.Unit>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function2<@R|kotlin.ParameterName|(name = String(a)) kotlin.Int, @R|kotlin.ParameterName|(name = String(b)) kotlin.String, kotlin.Unit>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function2<@R|kotlin.ParameterName|(name = String(a)) @R|kotlin.ParameterName|(name = String(notMe)) kotlin.Int, @R|kotlin.ParameterName|(name = String(b)) @R|kotlin.ParameterName|(name = String(meNeither)) kotlin.String, kotlin.Unit>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function2<@R|kotlin.ParameterName|(name = String(a)) kotlin.Int, @R|kotlin.ParameterName|(name = String(b)) kotlin.String, kotlin.Unit>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function1<@R|kotlin.ParameterName|(name = String(first)) @R|kotlin.ParameterName|(name = String(second)) kotlin.Int, kotlin.Unit>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function1<@R|kotlin.ParameterName|(name = String(first)) @R|kotlin.ParameterName|(name = String(second)) kotlin.Int, kotlin.Unit>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function1<@R|kotlin.ParameterName|(name = String(a)) kotlin.Int, kotlin.Unit>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Function2<@R|kotlin.ParameterName|(name = String(a)) kotlin.Int, kotlin.String, kotlin.Unit>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = Foo
signature = KtFunctionLikeSignature:
receiverType = Foo
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtSuccessCallInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = Foo
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtSuccessCallInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = serializer
isSafeNavigation = false
type = test.Serializer
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -32,6 +33,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -7,6 +7,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -7,6 +7,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtInapplicableCallCandidateInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = a
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -38,6 +39,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtInapplicableCallCandidateInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = a
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -38,6 +39,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = x
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Unit
@@ -6,6 +6,7 @@ KtApplicableCallCandidateInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: test/Target<kotlin/String>
type = test.Target<kotlin.String>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtApplicableCallCandidateInfo:
symbol = KtReceiverParameterSymbol:
origin: SOURCE
type: test/Target<kotlin/String>
type = test.Target<Stub (chain inference): TypeVariable(T)>
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtApplicableCallCandidateInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -7,6 +7,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Double
returnType = kotlin.Unit
@@ -24,6 +25,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Long
@@ -42,6 +44,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Long
returnType = kotlin.Double
@@ -7,6 +7,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Double
returnType = kotlin.Unit
@@ -24,6 +25,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Long
@@ -42,6 +44,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i
isSafeNavigation = false
type = kotlin.Int
signature = KtFunctionLikeSignature:
receiverType = kotlin.Long
returnType = kotlin.Double
@@ -7,6 +7,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()
isSafeNavigation = false
type = kotlin.Long
signature = KtFunctionLikeSignature:
receiverType = kotlin.Double
returnType = kotlin.Unit
@@ -25,6 +26,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()
isSafeNavigation = false
type = kotlin.Long
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Long
@@ -42,6 +44,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()
isSafeNavigation = false
type = kotlin.Long
signature = KtFunctionLikeSignature:
receiverType = kotlin.Long
returnType = kotlin.Double
@@ -7,6 +7,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()
isSafeNavigation = false
type = kotlin.Long
signature = KtFunctionLikeSignature:
receiverType = kotlin.Double
returnType = kotlin.Unit
@@ -25,6 +26,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()
isSafeNavigation = false
type = kotlin.Long
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Long
@@ -42,6 +44,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()
isSafeNavigation = false
type = kotlin.Long
signature = KtFunctionLikeSignature:
receiverType = kotlin.Long
returnType = kotlin.Double
@@ -6,6 +6,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()()
isSafeNavigation = false
type = kotlin.Double
signature = KtFunctionLikeSignature:
receiverType = kotlin.Double
returnType = kotlin.Unit
@@ -24,6 +25,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()()
isSafeNavigation = false
type = kotlin.Double
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Long
@@ -42,6 +44,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()()
isSafeNavigation = false
type = kotlin.Double
signature = KtFunctionLikeSignature:
receiverType = kotlin.Long
returnType = kotlin.Double
@@ -6,6 +6,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()()
isSafeNavigation = false
type = kotlin.Double
signature = KtFunctionLikeSignature:
receiverType = kotlin.Double
returnType = kotlin.Unit
@@ -24,6 +25,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()()
isSafeNavigation = false
type = kotlin.Double
signature = KtFunctionLikeSignature:
receiverType = kotlin.Int
returnType = kotlin.Long
@@ -42,6 +44,7 @@ KtInapplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = i()()
isSafeNavigation = false
type = kotlin.Double
signature = KtFunctionLikeSignature:
receiverType = kotlin.Long
returnType = kotlin.Double
@@ -5,6 +5,7 @@ KtApplicableCallCandidateInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = b1
isSafeNavigation = false
type = B
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtApplicableCallCandidateInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = b1
isSafeNavigation = false
type = B
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -5,6 +5,7 @@ KtApplicableCallCandidateInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = a1
isSafeNavigation = false
type = A
extensionReceiver = null
signature = KtFunctionLikeSignature:
receiverType = null
@@ -6,6 +6,7 @@ KtApplicableCallCandidateInfo:
extensionReceiver = KtExplicitReceiverValue:
expression = "str"
isSafeNavigation = false
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit
@@ -5,9 +5,11 @@ KtApplicableCallCandidateInfo:
dispatchReceiver = KtExplicitReceiverValue:
expression = f
isSafeNavigation = false
type = kotlin.Function1<kotlin.String, kotlin.Unit>
extensionReceiver = KtExplicitReceiverValue:
expression = ""
isSafeNavigation = false
type = kotlin.String
signature = KtFunctionLikeSignature:
receiverType = kotlin.String
returnType = kotlin.Unit

Some files were not shown because too many files have changed in this diff Show More