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:
@@ -86,7 +86,7 @@ static void diagSyntacticUseRestrictions(const Expr *E, const DeclContext *DC,
|
||||
|
||||
bool walkToDeclPre(Decl *D) override {
|
||||
if (auto *closure = dyn_cast<ClosureExpr>(D->getDeclContext()))
|
||||
return !closure->wasSeparatelyTypeChecked();
|
||||
return !closure->isSeparatelyTypeChecked();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1497,7 +1497,7 @@ static void diagnoseImplicitSelfUseInClosure(const Expr *E,
|
||||
// Don't walk into nested decls.
|
||||
bool walkToDeclPre(Decl *D) override {
|
||||
if (auto *closure = dyn_cast<ClosureExpr>(D->getDeclContext()))
|
||||
return !closure->wasSeparatelyTypeChecked();
|
||||
return !closure->isSeparatelyTypeChecked();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user