[AST] Add a enum for type checking state of ClosureExpr's body

This commit is contained in:
Rintaro Ishizaki
2020-07-01 16:04:15 -07:00
parent 0ec7a91e38
commit b1eec26653
8 changed files with 45 additions and 22 deletions

View File

@@ -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;
}