Skip to content

Commit

Permalink
Improve catch scope
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed May 4, 2024
1 parent 765787a commit 7f754a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/forwardanalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ namespace {
assert(!inDoWhile || Token::simpleMatch(tok, "} while ("));
if (Token::simpleMatch(tok, "} else {") || inDoWhile)
tok = tok->linkAt(2);
} else if (scope->type == Scope::eTry) {
} else if (ontains({Scope::eDo, Scope::eTry, Scope::eCatch}, scope->type)) {
if (!analyzer->lowerToPossible())
return Break(Analyzer::Terminate::Bail);
} else if (scope->type == Scope::eLambda) {
Expand Down

0 comments on commit 7f754a9

Please sign in to comment.