Skip to content

Commit

Permalink
Error recovery.
Browse files Browse the repository at this point in the history
  • Loading branch information
lahodaj committed Feb 7, 2025
1 parent f64ab0a commit 3199a66
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ private boolean exhausts(JCExpression selector, List<JCCase> cases) {
for (var l : c.labels) {
if (l instanceof JCPatternCaseLabel patternLabel) {
if (patternLabel.pat instanceof JCRecordPattern rec &&
rec.patternDeclaration != null &&
!rec.patternDeclaration.patternFlags.contains(PatternFlags.TOTAL)) {
continue;
}
Expand Down

0 comments on commit 3199a66

Please sign in to comment.