Minor. rename ConstraintSystemCompleter
In front-end we have other ConstraintSystemCompleter and because of this in dist we have ambiguity(because there all src folders compiles inside same module.
This commit is contained in:
+4
-4
@@ -19,8 +19,8 @@ package org.jetbrains.kotlin.resolve.calls.components
|
|||||||
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
import org.jetbrains.kotlin.descriptors.CallableDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompleter
|
import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompleter.ConstraintSystemCompletionMode
|
import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutor
|
import org.jetbrains.kotlin.resolve.calls.inference.components.NewTypeSubstitutor
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ExpectedTypeConstraintPosition
|
import org.jetbrains.kotlin.resolve.calls.inference.model.ExpectedTypeConstraintPosition
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.returnTypeOrNothing
|
import org.jetbrains.kotlin.resolve.calls.inference.returnTypeOrNothing
|
||||||
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.types.typeUtil.contains
|
|||||||
class KotlinCallCompleter(
|
class KotlinCallCompleter(
|
||||||
private val additionalDiagnosticReporter: AdditionalDiagnosticReporter,
|
private val additionalDiagnosticReporter: AdditionalDiagnosticReporter,
|
||||||
private val postponedArgumentsAnalyzer: PostponedArgumentsAnalyzer,
|
private val postponedArgumentsAnalyzer: PostponedArgumentsAnalyzer,
|
||||||
private val constraintSystemCompleter: ConstraintSystemCompleter
|
private val kotlinConstraintSystemCompleter: KotlinConstraintSystemCompleter
|
||||||
) {
|
) {
|
||||||
|
|
||||||
interface Context {
|
interface Context {
|
||||||
@@ -78,7 +78,7 @@ class KotlinCallCompleter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun SimpleKotlinResolutionCandidate.runCompletion(completionMode: ConstraintSystemCompletionMode, resolutionCallbacks: KotlinResolutionCallbacks) {
|
private fun SimpleKotlinResolutionCandidate.runCompletion(completionMode: ConstraintSystemCompletionMode, resolutionCallbacks: KotlinResolutionCallbacks) {
|
||||||
constraintSystemCompleter.runCompletion(
|
kotlinConstraintSystemCompleter.runCompletion(
|
||||||
constraintSystem.asConstraintSystemCompleterContext(), completionMode, descriptorWithFreshTypes.returnTypeOrNothing
|
constraintSystem.asConstraintSystemCompleterContext(), completionMode, descriptorWithFreshTypes.returnTypeOrNothing
|
||||||
) {
|
) {
|
||||||
postponedArgumentsAnalyzer.analyze(constraintSystem.asPostponedArgumentsAnalyzerContext(), resolutionCallbacks, it)
|
postponedArgumentsAnalyzer.analyze(constraintSystem.asPostponedArgumentsAnalyzerContext(), resolutionCallbacks, it)
|
||||||
|
|||||||
+2
-2
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.resolve.calls.inference
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter
|
import org.jetbrains.kotlin.resolve.calls.components.KotlinCallCompleter
|
||||||
import org.jetbrains.kotlin.resolve.calls.components.PostponedArgumentsAnalyzer
|
import org.jetbrains.kotlin.resolve.calls.components.PostponedArgumentsAnalyzer
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompleter
|
import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
|
import org.jetbrains.kotlin.resolve.calls.inference.model.ConstraintStorage
|
||||||
import org.jetbrains.kotlin.resolve.calls.model.KotlinCallDiagnostic
|
import org.jetbrains.kotlin.resolve.calls.model.KotlinCallDiagnostic
|
||||||
|
|
||||||
@@ -30,6 +30,6 @@ interface NewConstraintSystem {
|
|||||||
// after this method we shouldn't mutate system via ConstraintSystemBuilder
|
// after this method we shouldn't mutate system via ConstraintSystemBuilder
|
||||||
fun asReadOnlyStorage(): ConstraintStorage
|
fun asReadOnlyStorage(): ConstraintStorage
|
||||||
fun asCallCompleterContext(): KotlinCallCompleter.Context
|
fun asCallCompleterContext(): KotlinCallCompleter.Context
|
||||||
fun asConstraintSystemCompleterContext(): ConstraintSystemCompleter.Context
|
fun asConstraintSystemCompleterContext(): KotlinConstraintSystemCompleter.Context
|
||||||
fun asPostponedArgumentsAnalyzerContext(): PostponedArgumentsAnalyzer.Context
|
fun asPostponedArgumentsAnalyzerContext(): PostponedArgumentsAnalyzer.Context
|
||||||
}
|
}
|
||||||
+1
-1
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.types.TypeConstructor
|
|||||||
import org.jetbrains.kotlin.types.UnwrappedType
|
import org.jetbrains.kotlin.types.UnwrappedType
|
||||||
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
|
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
|
||||||
|
|
||||||
class ConstraintSystemCompleter(
|
class KotlinConstraintSystemCompleter(
|
||||||
private val resultTypeResolver: ResultTypeResolver,
|
private val resultTypeResolver: ResultTypeResolver,
|
||||||
private val variableFixationFinder: VariableFixationFinder
|
private val variableFixationFinder: VariableFixationFinder
|
||||||
) {
|
) {
|
||||||
|
|||||||
+2
-2
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.resolve.calls.inference.components
|
package org.jetbrains.kotlin.resolve.calls.inference.components
|
||||||
|
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompleter.ConstraintSystemCompletionMode
|
import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompleter.ConstraintSystemCompletionMode.*
|
import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter.ConstraintSystemCompletionMode.*
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.model.Constraint
|
import org.jetbrains.kotlin.resolve.calls.inference.model.Constraint
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.model.DeclaredUpperBoundConstraintPosition
|
import org.jetbrains.kotlin.resolve.calls.inference.model.DeclaredUpperBoundConstraintPosition
|
||||||
import org.jetbrains.kotlin.resolve.calls.inference.model.VariableWithConstraints
|
import org.jetbrains.kotlin.resolve.calls.inference.model.VariableWithConstraints
|
||||||
|
|||||||
+6
-6
@@ -38,7 +38,7 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re
|
|||||||
ConstraintInjector.Context,
|
ConstraintInjector.Context,
|
||||||
ResultTypeResolver.Context,
|
ResultTypeResolver.Context,
|
||||||
KotlinCallCompleter.Context,
|
KotlinCallCompleter.Context,
|
||||||
ConstraintSystemCompleter.Context,
|
KotlinConstraintSystemCompleter.Context,
|
||||||
PostponedArgumentsAnalyzer.Context
|
PostponedArgumentsAnalyzer.Context
|
||||||
{
|
{
|
||||||
private val storage = MutableConstraintStorage()
|
private val storage = MutableConstraintStorage()
|
||||||
@@ -185,7 +185,7 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re
|
|||||||
return storage.buildCurrentSubstitutor()
|
return storage.buildCurrentSubstitutor()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConstraintSystemBuilder, ConstraintSystemCompleter.Context
|
// ConstraintSystemBuilder, KotlinConstraintSystemCompleter.Context
|
||||||
override val hasContradiction: Boolean
|
override val hasContradiction: Boolean
|
||||||
get() = diagnostics.any { !it.candidateApplicability.isSuccess }.apply { checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION) }
|
get() = diagnostics.any { !it.candidateApplicability.isSuccess }.apply { checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION) }
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re
|
|||||||
return storage.notFixedTypeVariables
|
return storage.notFixedTypeVariables
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConstraintInjector.Context, ConstraintSystemCompleter.Context
|
// ConstraintInjector.Context, KotlinConstraintSystemCompleter.Context
|
||||||
override fun addError(error: KotlinCallDiagnostic) {
|
override fun addError(error: KotlinCallDiagnostic) {
|
||||||
checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION)
|
checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION)
|
||||||
storage.errors.add(error)
|
storage.errors.add(error)
|
||||||
@@ -252,11 +252,11 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re
|
|||||||
return storage.postponedArguments.filterIsInstance<PostponedLambdaArgument>()
|
return storage.postponedArguments.filterIsInstance<PostponedLambdaArgument>()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FixationOrderCalculator.Context, KotlinCallCompleter.Context, ConstraintSystemCompleter.Context
|
// FixationOrderCalculator.Context, KotlinCallCompleter.Context, KotlinConstraintSystemCompleter.Context
|
||||||
override val postponedArguments: List<PostponedKotlinCallArgument>
|
override val postponedArguments: List<PostponedKotlinCallArgument>
|
||||||
get() = storage.postponedArguments.apply { checkState(State.BUILDING, State.COMPLETION) }
|
get() = storage.postponedArguments.apply { checkState(State.BUILDING, State.COMPLETION) }
|
||||||
|
|
||||||
// ConstraintSystemCompleter.Context
|
// KotlinConstraintSystemCompleter.Context
|
||||||
override fun fixVariable(variable: NewTypeVariable, resultType: UnwrappedType) {
|
override fun fixVariable(variable: NewTypeVariable, resultType: UnwrappedType) {
|
||||||
checkState(State.BUILDING, State.COMPLETION)
|
checkState(State.BUILDING, State.COMPLETION)
|
||||||
|
|
||||||
@@ -278,7 +278,7 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re
|
|||||||
return storage.innerCalls
|
return storage.innerCalls
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConstraintSystemCompleter.Context, PostponedArgumentsAnalyzer.Context
|
// KotlinConstraintSystemCompleter.Context, PostponedArgumentsAnalyzer.Context
|
||||||
override fun canBeProper(type: UnwrappedType): Boolean {
|
override fun canBeProper(type: UnwrappedType): Boolean {
|
||||||
checkState(State.BUILDING, State.COMPLETION)
|
checkState(State.BUILDING, State.COMPLETION)
|
||||||
return !type.contains { storage.notFixedTypeVariables.containsKey(it.constructor) }
|
return !type.contains { storage.notFixedTypeVariables.containsKey(it.constructor) }
|
||||||
|
|||||||
Reference in New Issue
Block a user