NI: Get rid of confusing asConstraintSystemCompletionContext

NB: there is a different asConstraintSystemCompleterContext that might have side effects
This commit is contained in:
Denis.Zharkov
2021-12-24 09:26:14 +03:00
committed by teamcity
parent 47d74a16f2
commit 1d258635a2
4 changed files with 9 additions and 13 deletions
@@ -32,7 +32,5 @@ interface ConstraintSystemCompletionContext : VariableFixationFinder.Context, Re
fun fixVariable(variable: TypeVariableMarker, resultType: KotlinTypeMarker, position: FixVariableConstraintPosition<*>)
fun asConstraintSystemCompletionContext(): ConstraintSystemCompletionContext
fun couldBeResolvedWithUnrestrictedBuilderInference(): Boolean
}
@@ -104,8 +104,6 @@ class NewConstraintSystemImpl(
override fun asPostponedArgumentsAnalyzerContext() = apply { checkState(State.BUILDING) }
override fun asConstraintSystemCompletionContext(): ConstraintSystemCompletionContext = apply { checkState(State.BUILDING) }
// ConstraintSystemOperation
override fun registerVariable(variable: TypeVariableMarker) {
checkState(State.BUILDING, State.COMPLETION, State.TRANSACTION)