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

[Switch][Record Patterns] Unchecked conversion error missing from ECJ #3069

Merged
merged 8 commits into from
Oct 24, 2024

Commits on Oct 24, 2024

  1. [Switch][Record Patterns] Unchecked conversion error missing from ECJ

    + try to balance responsibility about type checking between
      - Pattern.isApplicable() - don't yet report in nested position
      - RecordPattern.resolveType() - failed to check isApplicable()
      - InstanceOfExpression.resolveType() - avoid pattern-agnostic checks
    
    + added the 1st(!) test for inapplicable record pattern in switch
    stephan-herrmann committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    4b12135 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a565312 View commit details
    Browse the repository at this point in the history
  3. check all patterns via isApplicable()

    + enclosing instanceof and case stmt are responsible for its invocation
    + make isApplicable() more capable to issue the desired problems
    + let problem reporter see the error location to select problemID
    + more renaming for clarity
    
    Test changes:
    + compatibility errors more consistently mark the entire instanceof expr
    + remove unwanted type qualifiers
    + don't expect some secondary errors
    stephan-herrmann committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    c2c9092 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2614da8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fdf6348 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    db6582d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    16beb44 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f45e77e View commit details
    Browse the repository at this point in the history