Add FQ_NAME postfix to OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION

This commit is contained in:
Dmitriy Novozhilov
2020-11-09 12:42:54 +03:00
parent dfad21270f
commit 025ec8e8b1
3 changed files with 4 additions and 4 deletions
@@ -14,7 +14,7 @@ import org.jetbrains.kotlin.resolve.calls.components.NewOverloadingConflictResol
import org.jetbrains.kotlin.resolve.calls.context.CheckArgumentTypesMode
import org.jetbrains.kotlin.resolve.calls.model.*
import org.jetbrains.kotlin.resolve.calls.tower.*
import org.jetbrains.kotlin.resolve.descriptorUtil.OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION
import org.jetbrains.kotlin.resolve.descriptorUtil.OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION_FQ_NAME
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValueWithSmartCastInfo
import org.jetbrains.kotlin.types.UnwrappedType
@@ -142,7 +142,7 @@ class KotlinCallResolver(
candidates.all { resolutionCallbacks.inferenceSession.shouldRunCompletion(it) }
) {
val candidatesWithAnnotation =
candidates.filter { it.resolvedCall.candidateDescriptor.annotations.hasAnnotation(OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION) }
candidates.filter { it.resolvedCall.candidateDescriptor.annotations.hasAnnotation(OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION_FQ_NAME) }
val candidatesWithoutAnnotation = candidates - candidatesWithAnnotation
if (candidatesWithAnnotation.isNotEmpty()) {
val newCandidates = kotlinCallCompleter.chooseCandidateRegardingOverloadResolutionByLambdaReturnType(maximallySpecificCandidates, resolutionCallbacks)