Skip to content

Clean up grammar for discontinued preview feature (pattern matching for switch) #18146

@stoyanK7

Description

@stoyanK7

Follow-up from issue


JEP 406 introduced a new preview feature in Java 17 called Pattern Matching for switch. Checkstyle added support for this in Issue #10848 and PR #11100. Since then, however, the feature got refined multiple times in:

In those refinements, some syntax was dropped and it is no longer compilable with Java 21. Checkstyle still supports this outdated grammar.

The goal of this issue is to remove ANTLR grammar for Pattern Matching for switch. The grammar was added in PR

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions