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

4.10.1.2: improve verification typing rules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 21
    • specification
    • vm

      A review of the typing rules in 4.10.1.2 identified a handful of bugs and stylistic concerns.

      - Different (name, loader) pairs that use the same name may refer to the same type, despite using different loaders. In particular, there are many different pairs that represent the same type Object.

      - The types 'uninitialized', 'uninitializedThis', and 'null' are not properly introduced.

      - A rule should treat an array type as a subtype of any interface type, just as is done for class types

      - References to the Java language, such as "Java reference type hierarchy", are distracting and sometimes misleading, and should be removed

      - The handling of primitive types byte, char, short, and boolean is imprecise (4.10.1.1 should really be responsible for mapping them all to type 'int')

      - The proper term for arrays is usually *component type*, not *element type*

      - The rules for 'null' are unnecessarily re-expressed in terms of the Object type

      - Subtyping among reference types has more layers than necessary—a single 'isJavaAssignable' predicate (suggest renaming to 'isWideningReference') is sufficient

      - There is no need for special subtyping rules to handle primitive types—the reflexive 'isAssignable' rule is sufficient (primitive types are only subtypes of themselves)

            dlsmith Dan Smith
            dlsmith Dan Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: