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

javac should reject records with @SafeVarargs applied to varargs record component

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 16
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b28

      Description

      this code:

      record R (@SafeVarargs String... s) {}

      is accepted by the compiler when it shouldn't according to the spec, the annotation would be applicable to the accessor but the generated accessor won't have any varargs argument, no arguments at all actually.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: