Skip to content

Add Check Support for Java 21 Unnamed Variables & Patterns Syntax: InnerAssignment #15068

@mahfouz72

Description

@mahfouz72

child of #14942:

check doc: https://checkstyle.org/checks/coding/innerassignment.html


public class Test {
    void test(Object obj) {
       boolean _ = false;
       if ( _ = true) {} // compile time error, Using '_' as a reference is not allowed
    }
}


Unnamed variables can't be assigned. no update is needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions