-
Enhancement
-
Resolution: Duplicate
-
P4
-
19
-
None
JLS 8.1.4 (https://docs.oracle.com/javase/specs/jls/se19/html/jls-8.html#jls-8.1.4) states:
The direct superclass type of a class whose declaration lacks an extends clause is as follows:
* The class Object has no direct superclass type.
* For a class other than Object with a normal class declaration, the direct superclass type is Object.
* For an enum class E, the direct superclass type is Enum<E>.
* For an anonymous class, the direct superclass type is defined in §15.9.5.
Record classes, like enum classes, lack an extends clause; however, the record cases is not included in this class. JLS 8.10. Record Classes does explicitly state:
The direct superclass type of a record class is Record (§8.1.4).
The direct superclass type of a class whose declaration lacks an extends clause is as follows:
* The class Object has no direct superclass type.
* For a class other than Object with a normal class declaration, the direct superclass type is Object.
* For an enum class E, the direct superclass type is Enum<E>.
* For an anonymous class, the direct superclass type is defined in §15.9.5.
Record classes, like enum classes, lack an extends clause; however, the record cases is not included in this class. JLS 8.10. Record Classes does explicitly state:
The direct superclass type of a record class is Record (§8.1.4).
- duplicates
-
JDK-8288228 8.1.4: Mention Record as a direct superclass type
-
- Resolved
-