From 76012f660307895622cb66a7974aee72508833fa Mon Sep 17 00:00:00 2001 From: Stanislav Erokhin Date: Mon, 14 Aug 2017 13:53:47 +0300 Subject: [PATCH] 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. --- .../resolve/calls/components/KotlinCallCompleter.kt | 8 ++++---- .../resolve/calls/inference/NewConstraintSystem.kt | 4 ++-- .../components/ConstraintSystemCompleterImpl.kt | 2 +- .../inference/components/VariableFixationFinder.kt | 4 ++-- .../calls/inference/model/NewConstraintSystemImpl.kt | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt index 59e36c9aaf9..cdba4680662 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/KotlinCallCompleter.kt @@ -19,8 +19,8 @@ package org.jetbrains.kotlin.resolve.calls.components import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor -import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompleter -import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemCompleter.ConstraintSystemCompletionMode +import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter +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.model.ExpectedTypeConstraintPosition import org.jetbrains.kotlin.resolve.calls.inference.returnTypeOrNothing @@ -36,7 +36,7 @@ import org.jetbrains.kotlin.types.typeUtil.contains class KotlinCallCompleter( private val additionalDiagnosticReporter: AdditionalDiagnosticReporter, private val postponedArgumentsAnalyzer: PostponedArgumentsAnalyzer, - private val constraintSystemCompleter: ConstraintSystemCompleter + private val kotlinConstraintSystemCompleter: KotlinConstraintSystemCompleter ) { interface Context { @@ -78,7 +78,7 @@ class KotlinCallCompleter( } private fun SimpleKotlinResolutionCandidate.runCompletion(completionMode: ConstraintSystemCompletionMode, resolutionCallbacks: KotlinResolutionCallbacks) { - constraintSystemCompleter.runCompletion( + kotlinConstraintSystemCompleter.runCompletion( constraintSystem.asConstraintSystemCompleterContext(), completionMode, descriptorWithFreshTypes.returnTypeOrNothing ) { postponedArgumentsAnalyzer.analyze(constraintSystem.asPostponedArgumentsAnalyzerContext(), resolutionCallbacks, it) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/NewConstraintSystem.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/NewConstraintSystem.kt index 3fe87c64538..fef4a6e8ed6 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/NewConstraintSystem.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/NewConstraintSystem.kt @@ -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.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.model.KotlinCallDiagnostic @@ -30,6 +30,6 @@ interface NewConstraintSystem { // after this method we shouldn't mutate system via ConstraintSystemBuilder fun asReadOnlyStorage(): ConstraintStorage fun asCallCompleterContext(): KotlinCallCompleter.Context - fun asConstraintSystemCompleterContext(): ConstraintSystemCompleter.Context + fun asConstraintSystemCompleterContext(): KotlinConstraintSystemCompleter.Context fun asPostponedArgumentsAnalyzerContext(): PostponedArgumentsAnalyzer.Context } \ No newline at end of file diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintSystemCompleterImpl.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintSystemCompleterImpl.kt index 4f48a1c3e44..a2f57b1fe1b 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintSystemCompleterImpl.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintSystemCompleterImpl.kt @@ -24,7 +24,7 @@ import org.jetbrains.kotlin.types.TypeConstructor import org.jetbrains.kotlin.types.UnwrappedType import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull -class ConstraintSystemCompleter( +class KotlinConstraintSystemCompleter( private val resultTypeResolver: ResultTypeResolver, private val variableFixationFinder: VariableFixationFinder ) { diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/VariableFixationFinder.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/VariableFixationFinder.kt index 90078f063cd..b6c6e4d29c2 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/VariableFixationFinder.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/VariableFixationFinder.kt @@ -16,8 +16,8 @@ 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.ConstraintSystemCompleter.ConstraintSystemCompletionMode.* +import org.jetbrains.kotlin.resolve.calls.inference.components.KotlinConstraintSystemCompleter.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.DeclaredUpperBoundConstraintPosition import org.jetbrains.kotlin.resolve.calls.inference.model.VariableWithConstraints diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt index 11eebb892bf..9710861a8e8 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/model/NewConstraintSystemImpl.kt @@ -38,7 +38,7 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re ConstraintInjector.Context, ResultTypeResolver.Context, KotlinCallCompleter.Context, - ConstraintSystemCompleter.Context, + KotlinConstraintSystemCompleter.Context, PostponedArgumentsAnalyzer.Context { private val storage = MutableConstraintStorage() @@ -185,7 +185,7 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re return storage.buildCurrentSubstitutor() } - // ConstraintSystemBuilder, ConstraintSystemCompleter.Context + // ConstraintSystemBuilder, KotlinConstraintSystemCompleter.Context override val hasContradiction: Boolean 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 } - // ConstraintInjector.Context, ConstraintSystemCompleter.Context + // ConstraintInjector.Context, KotlinConstraintSystemCompleter.Context override fun addError(error: KotlinCallDiagnostic) { checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION) storage.errors.add(error) @@ -252,11 +252,11 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re return storage.postponedArguments.filterIsInstance() } - // FixationOrderCalculator.Context, KotlinCallCompleter.Context, ConstraintSystemCompleter.Context + // FixationOrderCalculator.Context, KotlinCallCompleter.Context, KotlinConstraintSystemCompleter.Context override val postponedArguments: List get() = storage.postponedArguments.apply { checkState(State.BUILDING, State.COMPLETION) } - // ConstraintSystemCompleter.Context + // KotlinConstraintSystemCompleter.Context override fun fixVariable(variable: NewTypeVariable, resultType: UnwrappedType) { checkState(State.BUILDING, State.COMPLETION) @@ -278,7 +278,7 @@ class NewConstraintSystemImpl(val constraintInjector: ConstraintInjector, val re return storage.innerCalls } - // ConstraintSystemCompleter.Context, PostponedArgumentsAnalyzer.Context + // KotlinConstraintSystemCompleter.Context, PostponedArgumentsAnalyzer.Context override fun canBeProper(type: UnwrappedType): Boolean { checkState(State.BUILDING, State.COMPLETION) return !type.contains { storage.notFixedTypeVariables.containsKey(it.constructor) }