We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, I was looking at some of my code and found that jdt-ls gives a false positive error when using switch expressions on sealed interfaces.
jdt-ls
Example code snippet:
public sealed interface Day permits SchoolDay, Weekend, Holiday { // SNIP default void summary() { switch (this) { case SchoolDay day -> { out.println("Finished school day."); } case Weekend day -> { out.println("Finished weekend."); } case Holiday day -> { out.println("Finished holiday."); } } }
Here, jdt-ls gives 7 errors:
And similar errors on the other two classes that implement the interface Day.
Day
Apart from that, using sealed interfaces themselves are clunky, and needs better suggestions/code completions.
The text was updated successfully, but these errors were encountered:
@computerscience-person Could you attach a project example?
Sorry, something went wrong.
No branches or pull requests
Hello, I was looking at some of my code and found that
jdt-ls
gives a false positive error when using switch expressions on sealed interfaces.Example code snippet:
Here,
jdt-ls
gives 7 errors:And similar errors on the other two classes that implement the interface
Day
.Apart from that, using sealed interfaces themselves are clunky, and needs better suggestions/code completions.
The text was updated successfully, but these errors were encountered: