Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8246257

Annotated record's vararg type component started to be uncompilable with JDK15b24

    Details

    • Subcomponent:
    • Resolved In Build:
      b29
    • Verification:
      Verified

      Backports

        Description

        record R(@A int...ints) {
            @java.lang.annotation.Target({
                    java.lang.annotation.ElementType.TYPE_USE,
                    java.lang.annotation.ElementType.RECORD_COMPONENT})
            @interface A { }
        }


        JDK15 b23: OK
        ./javac --enable-preview --release 15 R.java
        Note: R.java uses preview language features.
        Note: Recompile with -Xlint:preview for details.

        JDK15b24: NOT OK
        ./javac --enable-preview --release 15 R.java
        R.java:1: error: invalid canonical constructor in record R
        record R(@A int...ints) {
        ^
          (type and arity must match that of the corresponding record component)
        Note: R.java uses preview language features.
        Note: Recompile with -Xlint:preview for details.
        1 error

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vromero Vicente Arturo Romero Zaldivar
                  Reporter:
                  dbessono Dmitry Bessonov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: