[lworld] javac is accepting annotation interface declarations with modifiers: identity and value

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: tools

      This is not allowed by the current spec [1]:

          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

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: