Skip to content

Can "sealed", "permits" keyworlds still be used as variable names (or method names) in Java 17? #4041

@jlerbsc

Description

@jlerbsc

As https://github.com/ctubbsii suggests "sealed", "permits" keyworlds are only keywords in a particular context.

https://openjdk.org/jeps/397
Specify the notion of a contextual keyword, superseding the prior notions of restricted identifier and restricted keyword in the JLS. Introduce the character sequences sealed, non-sealed, and permits as contextual keywords.

https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-Identifier

This refers to the discussion on the impact of this PR #4039

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug reportJava 17 Supporthttps://openjdk.java.net/projects/jdk/17/

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions