Skip to content
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

problematic re-use of ProblemIDs #3119

Open
stephan-herrmann opened this issue Oct 19, 2024 · 0 comments
Open

problematic re-use of ProblemIDs #3119

stephan-herrmann opened this issue Oct 19, 2024 · 0 comments

Comments

@stephan-herrmann
Copy link
Contributor

The ProblemIDs IncompatibleTypesInConditionalOperator and IncompatibleTypesInEqualityOperator have some "interesting" history.

IncompatibleTypesInConditionalOperator

Right from the beginning this ID was used for two different situations:

IncompatibleTypesInEqualityOperator

This new method is being shared from the following locations, and internally selects the ProblemID from the ast location:

  • InstanceOfExpression
  • Pattern
  • EqualExpression

Question1:
Are toplevel patterns (i.e., not members of a RecordPattern) correctly classified during error reporting?

ID vs message

I can see that the messages issued by the compiler are ok-ish, but I wonder if it is a good idea to share IDs from ancient Java versions for new error situations. Notably: is the current classification sufficient for JDT/UI for proposing suitable quickfixes (if any)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant