Merge pull request #61944 from angela-laar/refactor-generate-constraints-for-closures

[CSClosure] Refactor generateConstraints
This commit is contained in:
Angela Laar
2022-11-17 07:44:05 -08:00
committed by GitHub
3 changed files with 40 additions and 45 deletions

View File

@@ -10798,7 +10798,7 @@ bool ConstraintSystem::resolveClosure(TypeVariableType *typeVar,
setSolutionApplicationTarget(closure, target);
// Generate constraints from the body of this closure.
return !generateConstraints(closure);
return !generateConstraints(AnyFunctionRef{closure}, closure->getBody());
}
ConstraintSystem::SolutionKind
@@ -14545,7 +14545,7 @@ ConstraintSystem::simplifyConstraint(const Constraint &constraint) {
case ConstraintKind::Disjunction:
case ConstraintKind::Conjunction:
// {Dis, Con}junction constraints are never solved here.
// See {Dis, Con}junctionStep class in CSStep.cpp for solving
return SolutionKind::Unsolved;
case ConstraintKind::OneWayEqual: