[FE 1.0] Rename ManyCandidatesResolver to StubTypesBasedInferenceSession
This commit is contained in:
committed by
teamcity
parent
c1d3f7e5b4
commit
ab207ca58f
+3
-3
@@ -19,7 +19,7 @@ import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintS
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
|
||||
import org.jetbrains.kotlin.resolve.calls.inference.model.DelegatedPropertyConstraintPositionImpl
|
||||
import org.jetbrains.kotlin.resolve.calls.model.*
|
||||
import org.jetbrains.kotlin.resolve.calls.tower.ManyCandidatesResolver
|
||||
import org.jetbrains.kotlin.resolve.calls.tower.StubTypesBasedInferenceSession
|
||||
import org.jetbrains.kotlin.resolve.calls.tower.PSICallResolver
|
||||
import org.jetbrains.kotlin.resolve.calls.tower.PSIPartialCallInfo
|
||||
import org.jetbrains.kotlin.types.ErrorUtils
|
||||
@@ -36,11 +36,11 @@ class DelegatedPropertyInferenceSession(
|
||||
callComponents: KotlinCallComponents,
|
||||
builtIns: KotlinBuiltIns,
|
||||
override val parentSession: InferenceSession?
|
||||
) : ManyCandidatesResolver<FunctionDescriptor>(
|
||||
) : StubTypesBasedInferenceSession<FunctionDescriptor>(
|
||||
psiCallResolver, postponedArgumentsAnalyzer, kotlinConstraintSystemCompleter, callComponents, builtIns
|
||||
) {
|
||||
init {
|
||||
if (parentSession is ManyCandidatesResolver<*>) {
|
||||
if (parentSession is StubTypesBasedInferenceSession<*>) {
|
||||
parentSession.addNestedInferenceSession(this)
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -57,14 +57,14 @@ class BuilderInferenceSession(
|
||||
private val typeApproximator: TypeApproximator,
|
||||
private val missingSupertypesResolver: MissingSupertypesResolver,
|
||||
private val lambdaArgument: LambdaKotlinCallArgument
|
||||
) : ManyCandidatesResolver<CallableDescriptor>(
|
||||
) : StubTypesBasedInferenceSession<CallableDescriptor>(
|
||||
psiCallResolver, postponedArgumentsAnalyzer, kotlinConstraintSystemCompleter, callComponents, builtIns
|
||||
) {
|
||||
private lateinit var lambda: ResolvedLambdaAtom
|
||||
private val commonSystem = NewConstraintSystemImpl(callComponents.constraintInjector, builtIns, callComponents.kotlinTypeRefiner)
|
||||
|
||||
init {
|
||||
if (topLevelCallContext.inferenceSession is ManyCandidatesResolver<*>) {
|
||||
if (topLevelCallContext.inferenceSession is StubTypesBasedInferenceSession<*>) {
|
||||
topLevelCallContext.inferenceSession.addNestedInferenceSession(this)
|
||||
}
|
||||
stubsForPostponedVariables.keys.forEach(commonSystem::registerVariable)
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ import org.jetbrains.kotlin.resolve.calls.results.OverloadResolutionResults
|
||||
import org.jetbrains.kotlin.resolve.calls.tasks.TracingStrategy
|
||||
import org.jetbrains.kotlin.types.TypeConstructor
|
||||
|
||||
abstract class ManyCandidatesResolver<D : CallableDescriptor>(
|
||||
abstract class StubTypesBasedInferenceSession<D : CallableDescriptor>(
|
||||
private val psiCallResolver: PSICallResolver,
|
||||
private val postponedArgumentsAnalyzer: PostponedArgumentsAnalyzer,
|
||||
protected val kotlinConstraintSystemCompleter: KotlinConstraintSystemCompleter,
|
||||
@@ -31,9 +31,9 @@ abstract class ManyCandidatesResolver<D : CallableDescriptor>(
|
||||
protected val partiallyResolvedCallsInfo = arrayListOf<PSIPartialCallInfo>()
|
||||
private val errorCallsInfo = arrayListOf<PSIErrorCallInfo<D>>()
|
||||
private val completedCalls = hashSetOf<ResolvedAtom>()
|
||||
protected val nestedInferenceSessions = hashSetOf<ManyCandidatesResolver<*>>()
|
||||
protected val nestedInferenceSessions = hashSetOf<StubTypesBasedInferenceSession<*>>()
|
||||
|
||||
fun addNestedInferenceSession(inferenceSession: ManyCandidatesResolver<*>) {
|
||||
fun addNestedInferenceSession(inferenceSession: StubTypesBasedInferenceSession<*>) {
|
||||
nestedInferenceSessions.add(inferenceSession)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user