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

8.1.4: Mention direct superclass type of a record, for consistency with enum

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 22, 23
    • specification

      8.1.4. Superclasses and Subclasses

      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.

      8.9. Enum Classes:

      The direct superclass type of an enum class E is Enum<E> (§8.1.4).

      8.10. Record Classes

      The direct superclass type of a record class is Record (§8.1.4).

      ----------------------------

      For consistency, I would expect either not mentioning the direct superclass type of an enum class or also mentioning that of a record class in 8.1.4.

            gbierman Gavin Bierman
            prappo Pavel Rappo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: