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

8.1.4: Mention Record as a direct superclass type

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 18
    • specification

      From jls-jvms-spec-comments:

      In section 8.1.4 of the Java Language Standard, it is defined that "For an enum class E, the direct superclass type is Enum<E>.", and this is referred back to in section 8.9.
      However, section 8.10 also makes a similar reference, even though there is no mention of Record in the first itemized list of section 8.1.4, and that section would imply that the superclass of a record is Object, based on the second clause.
      I suppose that this was an oversight when Records were added to the JLS, and consequently a new point should be inserted between the third and fourth point of the first list in section 8.1.4, worded something like "For a record class R, the direct superclass type is Record".

            gbierman Gavin Bierman
            abuckley Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: