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

Records: Specify permitted accessibility of canonical constructor of a private record class

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: specification
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b28

      Backports

        Description

        In the draft language specification for Records, it is stated that "The access modifier of a canonical constructor for a record class must provide at least as much access as the record class" The specification continues by considering the different cases of accessibility, but the case for a record class that is private is missing.

        The missing case should read:

        - If the record class is `private`, then the canonical constructor may be
            declared with any accessibility.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gbierman Gavin Bierman
                  Reporter:
                  gbierman Gavin Bierman
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: