-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Sealed types][Enhanced Switch] Exhaustiveness in pattern matching switch is wrong #3166
Milestone
Comments
There have been numerous bug fixes in this area since 4.33. Are you able to test a recent I build to see if your problem is still there ?? |
This is most likely the same issue as #2720 |
srikanth-sankaran
changed the title
exhaustiveness in pattern matching switch is wrong
[Sealed types][Enhanced Switch] Exhaustiveness in pattern matching switch is wrong
Oct 26, 2024
This modified fuller program compiles and runs on master and prints:
compiles fine on master/HEAD and when run prints as expected:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As designed in JEP 441: Pattern Matching for switch, Switches and enum constants the following code is correct as it is exhaustive:
Eclipse Version: 2024-09 (4.33.0) Build id: 20240905-0614, compiler compliance 22 is activated, reports it as an error and necessitate a
default
case which is obviously wrong:The code can be successfully compiled with any external Java compiler ≥21.
The text was updated successfully, but these errors were encountered: