Remove useless parameter

Private function convertToOverloadResults() has two call sites, both:

* inside member functions of the NewResolutionOldInference class
* passing NewResolutionOldInference.languageVersionSettings

Therefore, it is safe to remove this parameter from the signature of
convertToOverloadResults(). The occurence of languageVerstionSetting
in it's return statement will refer (implicitly) to the definition from
its class.
This commit is contained in:
Cuihtlauac ALVARADO
2018-06-28 10:14:26 +02:00
committed by Dmitry Savvinov
parent ece745966b
commit 094dc2ae45
@@ -209,7 +209,7 @@ class NewResolutionOldInference(
}
}
val overloadResults = convertToOverloadResults<D>(candidates, tracing, context, languageVersionSettings)
val overloadResults = convertToOverloadResults<D>(candidates, tracing, context)
coroutineInferenceSupport.checkCoroutineCalls(context, tracing, overloadResults)
return overloadResults
}
@@ -255,7 +255,7 @@ class NewResolutionOldInference(
TowerResolver.SuccessfulResultCollector(), useOrder = true
)
return convertToOverloadResults(processedCandidates, tracing, basicCallContext, languageVersionSettings)
return convertToOverloadResults(processedCandidates, tracing, basicCallContext)
}
private fun <D : CallableDescriptor> allCandidatesResult(allCandidates: Collection<MyCandidate>) =
@@ -266,8 +266,7 @@ class NewResolutionOldInference(
private fun <D : CallableDescriptor> convertToOverloadResults(
candidates: Collection<MyCandidate>,
tracing: TracingStrategy,
basicCallContext: BasicCallResolutionContext,
languageVersionSettings: LanguageVersionSettings
basicCallContext: BasicCallResolutionContext
): OverloadResolutionResultsImpl<D> {
val resolvedCalls = candidates.map {
val (diagnostics, resolvedCall) = it