Rename language feature to make it more clear

This commit is contained in:
Mikhail Zarechenskiy
2020-05-29 16:28:20 +03:00
parent bbe00b2fdc
commit ea6a8ce5cd
17 changed files with 18 additions and 18 deletions
@@ -141,14 +141,14 @@ class KotlinCallResolver(
if (
maximallySpecificCandidates.size > 1 &&
callComponents.languageVersionSettings.supportsFeature(LanguageFeature.FactoryPatternResolution) &&
callComponents.languageVersionSettings.supportsFeature(LanguageFeature.OverloadResolutionByLambdaReturnType) &&
candidates.all { resolutionCallbacks.inferenceSession.shouldRunCompletion(it) }
) {
val candidatesWithAnnotation =
candidates.filter { it.resolvedCall.candidateDescriptor.annotations.hasAnnotation(OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION) }
val candidatesWithoutAnnotation = candidates - candidatesWithAnnotation
if (candidatesWithAnnotation.isNotEmpty()) {
val newCandidates = kotlinCallCompleter.chooseCandidateRegardingFactoryPatternResolution(maximallySpecificCandidates, resolutionCallbacks)
val newCandidates = kotlinCallCompleter.chooseCandidateRegardingOverloadResolutionByLambdaReturnType(maximallySpecificCandidates, resolutionCallbacks)
maximallySpecificCandidates = overloadingConflictResolver.chooseMaximallySpecificCandidates(
newCandidates,
CheckArgumentTypesMode.CHECK_VALUE_ARGUMENTS,
@@ -76,7 +76,7 @@ class KotlinCallCompleter(
}
}
fun chooseCandidateRegardingFactoryPatternResolution(
fun chooseCandidateRegardingOverloadResolutionByLambdaReturnType(
candidates: Set<KotlinResolutionCandidate>,
resolutionCallbacks: KotlinResolutionCallbacks
): Set<KotlinResolutionCandidate> {