[FIR] Code cleanup: CandidateCollector
This commit is contained in:
+6
-5
@@ -19,10 +19,11 @@ open class CandidateCollector(
|
|||||||
val components: BodyResolveComponents,
|
val components: BodyResolveComponents,
|
||||||
val resolutionStageRunner: ResolutionStageRunner
|
val resolutionStageRunner: ResolutionStageRunner
|
||||||
) {
|
) {
|
||||||
val groupNumbers = mutableListOf<Int>()
|
private val groupNumbers = mutableListOf<Int>()
|
||||||
val candidates = mutableListOf<Candidate>()
|
private val candidates = mutableListOf<Candidate>()
|
||||||
|
|
||||||
var currentApplicability = CandidateApplicability.HIDDEN
|
var currentApplicability = CandidateApplicability.HIDDEN
|
||||||
|
private set
|
||||||
|
|
||||||
fun newDataSet() {
|
fun newDataSet() {
|
||||||
groupNumbers.clear()
|
groupNumbers.clear()
|
||||||
@@ -73,10 +74,10 @@ open class CandidateCollector(
|
|||||||
// Collects properties that potentially could be invoke receivers, like 'propertyName()',
|
// Collects properties that potentially could be invoke receivers, like 'propertyName()',
|
||||||
// and initiates further invoke resolution by adding property-bound invoke consumers
|
// and initiates further invoke resolution by adding property-bound invoke consumers
|
||||||
class InvokeReceiverCandidateCollector(
|
class InvokeReceiverCandidateCollector(
|
||||||
val towerResolver: FirTowerResolver,
|
private val towerResolver: FirTowerResolver,
|
||||||
val invokeCallInfo: CallInfo,
|
private val invokeCallInfo: CallInfo,
|
||||||
components: BodyResolveComponents,
|
components: BodyResolveComponents,
|
||||||
val invokeConsumer: AccumulatingTowerDataConsumer,
|
private val invokeConsumer: AccumulatingTowerDataConsumer,
|
||||||
resolutionStageRunner: ResolutionStageRunner
|
resolutionStageRunner: ResolutionStageRunner
|
||||||
) : CandidateCollector(components, resolutionStageRunner) {
|
) : CandidateCollector(components, resolutionStageRunner) {
|
||||||
override fun consumeCandidate(group: Int, candidate: Candidate): CandidateApplicability {
|
override fun consumeCandidate(group: Int, candidate: Candidate): CandidateApplicability {
|
||||||
|
|||||||
Reference in New Issue
Block a user