-
Enhancement
-
Resolution: Fixed
-
P4
-
18
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".
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".
- duplicates
-
JDK-8298628 8.1.4. Superclasses and Subclasses omits explicit mention of records
-
- Closed
-