[lworld] Integrated: 8292630: [lworld] javac is accepting annotation interface declarations with modifiers: identity and value
Vicente Romero
vromero at openjdk.org
Tue Aug 23 15:49:57 UTC 2022
On Mon, 22 Aug 2022 17:54:34 GMT, Vicente Romero <vromero at openjdk.org> wrote:
> Please review this fix which is syncing the compiler implementation with the spec. The current spec [1] mentions that:
>
> * It is a compile-time error if an annotation interface declaration has the modifier sealed, or non-sealed, identity, or value (9.1.1.4).
>
> So code code like:
>
> value @interface I {} and
> identity @interface I {}
>
>
> should be rejected by the compiler.
>
> [1] http://cr.openjdk.java.net/~dlsmith/jep8277163/jep8277163-20220519/specs/value-objects-jls.html
This pull request has now been integrated.
Changeset: 4a3131a8
Author: Vicente Romero <vromero at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/4a3131a875760e00c10857e5d6b9eced861506bd
Stats: 24 lines in 4 files changed: 22 ins; 0 del; 2 mod
8292630: [lworld] javac is accepting annotation interface declarations with modifiers: identity and value
-------------
PR: https://git.openjdk.org/valhalla/pull/723
More information about the valhalla-dev
mailing list