K2: reorganize code in ConstraintSystemCompleter around PCLA mode
This commit is contained in:
committed by
Space Team
parent
56475c0a5b
commit
f1aaae9515
+5
-10
@@ -165,17 +165,14 @@ class ConstraintSystemCompleter(components: BodyResolveComponents) {
|
||||
analyze(it, /* withPCLASession = */ false)
|
||||
}
|
||||
) continue
|
||||
}
|
||||
|
||||
// Stage 8: report "not enough information" for uninferred type variables
|
||||
reportNotEnoughTypeInformation(
|
||||
completionMode, topLevelAtoms, topLevelType, postponedArguments
|
||||
)
|
||||
|
||||
if (completionMode == ConstraintSystemCompletionMode.PCLA_POSTPONED_CALL) {
|
||||
reportNotEnoughInformationForTypeVariablesRequiredForInputTypesOfLambdas(
|
||||
postponedArguments, topLevelType, dependencyProvider, topLevelAtoms
|
||||
)
|
||||
} else if (completionMode != ConstraintSystemCompletionMode.PARTIAL) {
|
||||
// Stage 8: report "not enough information" for uninferred type variables
|
||||
reportNotEnoughTypeInformation(
|
||||
completionMode, topLevelAtoms, topLevelType, postponedArguments
|
||||
)
|
||||
}
|
||||
|
||||
// Stage 9: force analysis of remaining not analyzed postponed arguments and rerun stages if there are
|
||||
@@ -317,8 +314,6 @@ class ConstraintSystemCompleter(components: BodyResolveComponents) {
|
||||
"At this stage there should be no remaining variables with proper constraints"
|
||||
}
|
||||
|
||||
if (completionMode == ConstraintSystemCompletionMode.PARTIAL || completionMode == ConstraintSystemCompletionMode.PCLA_POSTPONED_CALL) break
|
||||
|
||||
val variableWithConstraints = notFixedTypeVariables.getValue(variableForFixation.variable)
|
||||
processVariableWhenNotEnoughInformation(variableWithConstraints, topLevelAtoms)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user