[NI] Do not use return type from 'onlyResolvedCall'
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
5b2e66f0ca
commit
397e04f382
@@ -181,7 +181,7 @@ internal fun createSimplePSICallArgument(
|
||||
val onlyResolvedCall = ktExpression.getCall(bindingContext)?.let {
|
||||
bindingContext.get(BindingContext.ONLY_RESOLVED_CALL, it)
|
||||
}
|
||||
val baseType = onlyResolvedCall?.currentReturnType ?: typeInfoForArgument.type?.unwrap() ?: return null
|
||||
val baseType = typeInfoForArgument.type?.unwrap() ?: return null
|
||||
|
||||
// we should use DFI after this argument, because there can be some useful smartcast. Popular case: if branches.
|
||||
val receiverToCast = transformToReceiverWithSmartCastInfo(
|
||||
|
||||
+1
-5
@@ -31,11 +31,7 @@ sealed class ResolvedKotlinCall {
|
||||
val lambdaArguments: List<ResolvedLambdaArgument>
|
||||
): ResolvedKotlinCall()
|
||||
|
||||
class OnlyResolvedKotlinCall(
|
||||
val candidate: KotlinResolutionCandidate
|
||||
) : ResolvedKotlinCall() {
|
||||
val currentReturnType: UnwrappedType = candidate.lastCall.descriptorWithFreshTypes.returnTypeOrNothing
|
||||
}
|
||||
class OnlyResolvedKotlinCall(val candidate: KotlinResolutionCandidate) : ResolvedKotlinCall()
|
||||
}
|
||||
|
||||
sealed class CompletedKotlinCall {
|
||||
|
||||
Reference in New Issue
Block a user