mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Add a enum for type checking state of ClosureExpr's body
This commit is contained in:
@@ -345,11 +345,13 @@ SolutionApplicationToFunctionResult ConstraintSystem::applySolution(
|
||||
ClosureConstraintApplication application(
|
||||
solution, closure, closureFnType->getResult(), rewriteTarget);
|
||||
application.visit(fn.getBody());
|
||||
closure->setBodyState(ClosureExpr::BodyState::TypeCheckedAtOnce);
|
||||
|
||||
return SolutionApplicationToFunctionResult::Success;
|
||||
}
|
||||
|
||||
// Otherwise, we need to delay type checking of the closure until later.
|
||||
solution.setExprTypes(closure);
|
||||
closure->setBodyState(ClosureExpr::BodyState::ReadyForTypeChecking);
|
||||
return SolutionApplicationToFunctionResult::Delay;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user