Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8323626 improve verification typing rules



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


      A review of the typing rules in 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 ( 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)


        Issue Links



              dlsmith Dan Smith
              dlsmith Dan Smith
              0 Vote for this issue
              1 Start watching this issue