-
Bug
-
Resolution: Unresolved
-
P4
-
21
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)
- 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)
- relates to
-
JDK-8323557 4.10.1: clarify distinction between types and classes
- Open