diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt index 4d885fc19b4..6616c8e16c1 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/inference/BuilderInferenceSession.kt @@ -126,23 +126,6 @@ class BuilderInferenceSession( if (skipCall(callInfo.callResolutionResult)) return commonCalls.add(callInfo) - - val resultingDescriptor = callInfo.resolvedCall.resultingDescriptor - - // This check is similar to one for old inference, see getCoroutineInferenceData() function - val checkCall = resultingDescriptor is LocalVariableDescriptor || anyReceiverContainStubType(resultingDescriptor) - - if (!checkCall) return - - val isApplicableCall = - callComponents.statelessCallbacks.isApplicableCallForBuilderInference( - resultingDescriptor, - callComponents.languageVersionSettings - ) - - if (!isApplicableCall) { - hasInapplicableCall = true - } } private fun anyReceiverContainStubType(descriptor: CallableDescriptor): Boolean { diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionStatelessCallbacksImpl.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionStatelessCallbacksImpl.kt index 789203ef1e7..5a83e5bda16 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionStatelessCallbacksImpl.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionStatelessCallbacksImpl.kt @@ -95,13 +95,6 @@ class KotlinResolutionStatelessCallbacksImpl( override fun isCoroutineCall(argument: KotlinCallArgument, parameter: ValueParameterDescriptor): Boolean = isCoroutineCallWithAdditionalInference(parameter, argument.psiCallArgument.valueArgument, languageVersionSettings) - override fun isApplicableCallForBuilderInference( - descriptor: CallableDescriptor, - languageVersionSettings: LanguageVersionSettings, - ): Boolean { - return org.jetbrains.kotlin.resolve.calls.inference.isApplicableCallForBuilderInference(descriptor, languageVersionSettings) - } - override fun isOldIntersectionIsEmpty(types: Collection): Boolean { return TypeIntersector.intersectTypes(types) == null } diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt index 4262dae37a8..776588e2f1c 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt @@ -39,7 +39,6 @@ interface KotlinResolutionStatelessCallbacks { fun getScopeTowerForCallableReferenceArgument(argument: CallableReferenceKotlinCallArgument): ImplicitScopeTower fun getVariableCandidateIfInvoke(functionCall: KotlinCall): KotlinResolutionCandidate? fun isCoroutineCall(argument: KotlinCallArgument, parameter: ValueParameterDescriptor): Boolean - fun isApplicableCallForBuilderInference(descriptor: CallableDescriptor, languageVersionSettings: LanguageVersionSettings): Boolean fun isOldIntersectionIsEmpty(types: Collection): Boolean