[CSClosure] Generate constraints for empty closure body

We should do this in the ConstraintGenerator instead of in a ConstraintSystem method.
This commit is contained in:
Angela Laar
2022-11-10 15:27:52 -08:00
parent b4549d63f0
commit 8257cc1e10
2 changed files with 22 additions and 22 deletions

View File

@@ -10797,8 +10797,7 @@ bool ConstraintSystem::resolveClosure(TypeVariableType *typeVar,
setSolutionApplicationTarget(closure, target);
// Generate constraints from the body of this closure.
return !generateConstraints(
AnyFunctionRef(cast<AbstractClosureExpr>(closure)), closure->getBody());
return !generateConstraints(AnyFunctionRef{closure}, closure->getBody());
}
ConstraintSystem::SolutionKind