You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
srikanth-sankaran
changed the title
[23] ECJ rejects boolean type pattern with default case
[23][Primitive type patterns] ECJ rejects boolean type pattern with default case
Oct 22, 2024
At first glance, it looks like this should be rejected. What is the difference between the scenario where both true and false are expressly listed and this one ??
This is a fallout after issue #2916 was fixed, I think.
Here's the relevant code that Javac accepts but we reject:
The reported error is: Switch cannot have both boolean values and a default label
This is because we are using the same Exhaustive flag for total pattern as well as true+false. Should we differentiate between the two conditions?
@stephan-herrmann
The text was updated successfully, but these errors were encountered: