mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Sema] Remove separate closure type-checking logic
`participatesInInference` is now always true for a non-empty body, remove it along with the separate type-checking logic such that empty bodies are type-checked together with the context.
This commit is contained in:
@@ -130,7 +130,7 @@ public:
|
||||
auto *ACE = TheFunction.get<AbstractClosureExpr *>();
|
||||
if (auto *CE = dyn_cast<ClosureExpr>(ACE)) {
|
||||
CE->setBody(stmt);
|
||||
CE->setBodyState(ClosureExpr::BodyState::ReadyForTypeChecking);
|
||||
CE->setBodyState(ClosureExpr::BodyState::Parsed);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
auto *ACE = TheFunction.get<AbstractClosureExpr *>();
|
||||
if (auto *CE = dyn_cast<ClosureExpr>(ACE)) {
|
||||
CE->setBody(stmt);
|
||||
CE->setBodyState(ClosureExpr::BodyState::TypeCheckedWithSignature);
|
||||
CE->setBodyState(ClosureExpr::BodyState::TypeChecked);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user