Omission of Record superclass

Wolters, R.A. (Alexander) alexander.wolters at ru.nl
Sun Jan 2 11:33:17 UTC 2022


To whom it may concern,

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".

Yours 

Alexander Wolters
Radboud University Nijmegen


More information about the jls-jvms-spec-comments mailing list