[FIR] Rename: selectCandidateFrom... -> selectDelegatingConstructorCall

This commit is contained in:
Mikhail Glukhikh
2020-04-13 11:43:40 +03:00
parent e954aea4cc
commit 734ddc0369
@@ -315,12 +315,12 @@ class FirCallResolver(
candidates += candidate candidates += candidate
} }
} }
return callResolver.selectCandidateFromGivenCandidates(delegatedConstructorCall, className, candidates) return callResolver.selectDelegatingConstructorCall(delegatedConstructorCall, className, candidates)
} }
private fun <T> selectCandidateFromGivenCandidates( private fun selectDelegatingConstructorCall(
call: T, name: Name, candidates: Collection<Candidate>, call: FirDelegatedConstructorCall, name: Name, candidates: Collection<Candidate>,
): T where T : FirResolvable, T : FirCall { ): FirDelegatedConstructorCall {
val result = CandidateCollector(this, resolutionStageRunner) val result = CandidateCollector(this, resolutionStageRunner)
candidates.forEach { result.consumeCandidate(TowerGroup.Start, it) } candidates.forEach { result.consumeCandidate(TowerGroup.Start, it) }
val bestCandidates = result.bestCandidates() val bestCandidates = result.bestCandidates()
@@ -337,7 +337,7 @@ class FirCallResolver(
result.currentApplicability, result.currentApplicability,
) )
return call.transformCalleeReference(StoreNameReference, nameReference) as T return call.transformCalleeReference(StoreNameReference, nameReference)
} }
private fun createCallableReferencesInfoForLHS( private fun createCallableReferencesInfoForLHS(