Skip to content

Commit

Permalink
Fix #357 - dropped else block
Browse files Browse the repository at this point in the history
  • Loading branch information
leibnitz27 committed Jul 21, 2024
1 parent d6f6758 commit 3d1d0f4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ public boolean test(BlockIdentifier in) {
if (blocksAtStart.size() == blocksAtEnd.size()+1) {
List<BlockIdentifier> change = SetUtil.differenceAtakeBtoList(blocksAtStart, blocksAtEnd);
// size == 1 already verified, but...
if (change.size() == 1 && change.get(0).getBlockType() == BlockType.CASE) {
if (change.size() == 1 &&
(change.get(0).getBlockType() == BlockType.CASE ||
change.get(0).getBlockType() == BlockType.CATCHBLOCK)) {
if (takenTarget.getStatement() instanceof CaseStatement) {
// We need to check if the statement LINEARLY preceeding this is in the block we've left.
if (stmtLastBlock.getBlockIdentifiers().contains(change.get(0))) {
Expand Down

0 comments on commit 3d1d0f4

Please sign in to comment.