-
Notifications
You must be signed in to change notification settings - Fork 142
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
[19] ECJ reports switch with total record pattern as not exhaustive #398
Comments
I thought we can fix this simply by computing and storing isTotalTypeNode for a record pattern rather. But this had issues in code generation where we were using the same flag to mean whether the pattern is a subtype or not. So, we will have to make some changes in how we store and use this flag. I have a working patch, but needs more testing and considering how late we are in the game, would like to test it bit more. There's a chance this will only make it after the GA. |
Sorry, I should have updated. The earlier patch wasn't good enough. So, I left it at that. I believe this is same as #587 , which Manoj is looking at. Copying @mpalat |
@jarthana : please close if fixed or set other milestone, BETA_JAVA19 is not valid anymore. |
Try this testcase:
ECJ reports the switch to be not exhaustive and suggest adding a default case. But it's not required as we already have a total pattern in the record pattern Person(var name, var age). I suspect this is due to the unimplemented isTotalForType() in RecordPattern.
The text was updated successfully, but these errors were encountered: