mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] NFC: Use stored result type while generating constraints for closures
Instead of passing/storing result type to constraint generator, let's retrieve it from the constraint system when needed.
This commit is contained in:
@@ -8950,7 +8950,7 @@ bool ConstraintSystem::resolveClosure(TypeVariableType *typeVar,
|
||||
// generate constraints for it now.
|
||||
auto &ctx = getASTContext();
|
||||
if (shouldTypeCheckInEnclosingExpression(closure)) {
|
||||
if (generateConstraints(closure, closureType->getResult()))
|
||||
if (generateConstraints(closure))
|
||||
return false;
|
||||
} else if (!hasExplicitResult(closure)) {
|
||||
// If this closure has an empty body and no explicit result type
|
||||
|
||||
Reference in New Issue
Block a user