[FE] Support multiple candidates for extension receiver
This commit is contained in:
committed by
TeamCityServer
parent
403ec7a5b1
commit
e53cee77a3
+11
-4
@@ -35,10 +35,7 @@ import org.jetbrains.kotlin.resolve.calls.CallTransformer
|
||||
import org.jetbrains.kotlin.resolve.calls.CandidateResolver
|
||||
import org.jetbrains.kotlin.resolve.calls.context.*
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.BuilderInferenceSupport
|
||||
import org.jetbrains.kotlin.resolve.calls.model.KotlinCallDiagnostic
|
||||
import org.jetbrains.kotlin.resolve.calls.model.MutableResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCallImpl
|
||||
import org.jetbrains.kotlin.resolve.calls.model.VariableAsFunctionResolvedCallImpl
|
||||
import org.jetbrains.kotlin.resolve.calls.model.*
|
||||
import org.jetbrains.kotlin.resolve.calls.results.OverloadResolutionResultsImpl
|
||||
import org.jetbrains.kotlin.resolve.calls.results.ResolutionResultsHandler
|
||||
import org.jetbrains.kotlin.resolve.calls.results.ResolutionStatus
|
||||
@@ -492,6 +489,16 @@ class NewResolutionOldInference(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The function is called only inside [NoExplicitReceiverScopeTowerProcessor] with [TowerData.BothTowerLevelAndContextReceiversGroup].
|
||||
* This case involves only [SimpleCandidateFactory].
|
||||
*/
|
||||
override fun createCandidate(
|
||||
towerCandidate: CandidateWithBoundDispatchReceiver,
|
||||
explicitReceiverKind: ExplicitReceiverKind,
|
||||
extensionReceiverCandidates: List<ReceiverValueWithSmartCastInfo>
|
||||
): MyCandidate = error("${this::class.simpleName} doesn't support candidates with multiple extension receiver candidates")
|
||||
|
||||
override fun createErrorCandidate(): MyCandidate {
|
||||
throw IllegalStateException("Not supported creating error candidate for the old type inference candidate factory")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user