Merge pull request #27955 from AnthonyLatsis/bracestmt_cleanup

NFC: Solidify and tidy up the BraceStmt interface
This commit is contained in:
Robert Widmann
2019-10-31 13:48:40 -07:00
committed by GitHub
17 changed files with 47 additions and 46 deletions

View File

@@ -2673,7 +2673,7 @@ void ContextualFailure::tryComputedPropertyFixIts(Expr *expr) const {
if (auto TLCD = dyn_cast<TopLevelCodeDecl>(getDC())) {
if (TLCD->getBody()->isImplicit()) {
if (auto decl = TLCD->getBody()->getElement(0).dyn_cast<Decl *>()) {
if (auto decl = TLCD->getBody()->getFirstElement().dyn_cast<Decl *>()) {
if (auto binding = dyn_cast<PatternBindingDecl>(decl)) {
PBD = binding;
}