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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • 15
    • specification
    • b28

        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.

              gbierman Gavin Bierman
              gbierman Gavin Bierman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: