Skip to content

Commit

Permalink
Add a label'd break to confirm that this is the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 committed Jun 19, 2024
1 parent 8b34244 commit 8e6fe43
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ private boolean tryReduceSwitchWithConstantInput(JSwitchStatement s, Context ctx

// Find the matching case
JCaseStatement matchingCase = null;
for (JStatement subStatement : s.getBody().getStatements()) {
statements: for (JStatement subStatement : s.getBody().getStatements()) {
if (subStatement instanceof JCaseStatement) {
JCaseStatement caseStatement = (JCaseStatement) subStatement;
if (caseStatement.isDefault()) {
Expand All @@ -1218,7 +1218,7 @@ private boolean tryReduceSwitchWithConstantInput(JSwitchStatement s, Context ctx
JValueLiteral caseValue = (JValueLiteral) expr;
if (caseValue.getValueObj().equals(targetValue.getValueObj())) {
matchingCase = caseStatement;
break;
break statements;
}
}
}
Expand Down

0 comments on commit 8e6fe43

Please sign in to comment.