From 094dc2ae45ed76a2f92d4e92de12d6092b55084e Mon Sep 17 00:00:00 2001 From: Cuihtlauac ALVARADO Date: Thu, 28 Jun 2018 10:14:26 +0200 Subject: [PATCH] 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. --- .../resolve/calls/tower/NewResolutionOldInference.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/NewResolutionOldInference.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/NewResolutionOldInference.kt index 4521f5e7674..498ed603217 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/NewResolutionOldInference.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/NewResolutionOldInference.kt @@ -209,7 +209,7 @@ class NewResolutionOldInference( } } - val overloadResults = convertToOverloadResults(candidates, tracing, context, languageVersionSettings) + val overloadResults = convertToOverloadResults(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 allCandidatesResult(allCandidates: Collection) = @@ -266,8 +266,7 @@ class NewResolutionOldInference( private fun convertToOverloadResults( candidates: Collection, tracing: TracingStrategy, - basicCallContext: BasicCallResolutionContext, - languageVersionSettings: LanguageVersionSettings + basicCallContext: BasicCallResolutionContext ): OverloadResolutionResultsImpl { val resolvedCalls = candidates.map { val (diagnostics, resolvedCall) = it