[NI] Remove unneeded computation of possible types for return type

This call was needed at some point for smartcasts on qualified
 expressions but become obsolete (most likely after
 daa27016ca).

 Now `ComplexDataFlowBenchmark` has similar results for NI and OI
This commit is contained in:
Mikhail Zarechenskiy
2019-09-17 15:43:59 +03:00
parent d47fc85868
commit 0431c21f9a
3 changed files with 4 additions and 30 deletions
@@ -226,21 +226,6 @@ class KotlinResolutionCallbacksImpl(
)
}
override fun createReceiverWithSmartCastInfo(resolvedAtom: ResolvedCallAtom): ReceiverValueWithSmartCastInfo? {
val returnType = resolvedAtom.candidateDescriptor.returnType ?: return null
val psiKotlinCall = resolvedAtom.atom.psiKotlinCall
val callElement = psiKotlinCall.psiCall.callElement.safeAs<KtExpression>() ?: return null
val expression = findCommonParent(callElement, resolvedAtom.atom.psiKotlinCall.explicitReceiver)
return transformToReceiverWithSmartCastInfo(
resolvedAtom.candidateDescriptor,
trace.bindingContext,
psiKotlinCall.resultDataFlowInfo,
ExpressionReceiver.create(expression, returnType, trace.bindingContext),
languageVersionSettings, dataFlowValueFactory
)
}
override fun isCompileTimeConstant(resolvedAtom: ResolvedCallAtom, expectedType: UnwrappedType): Boolean {
val descriptor = resolvedAtom.candidateDescriptor