-
Bug
-
Resolution: Unresolved
-
P4
-
21
Assignment compatibility is defined by the Java language. Since Java 5, it allows conversions like int --> Object.
Assertions about types in 4.9.2 are stated in terms of assignment compatibility (and, in one case, method invocation compatibility), but this introduces an inappropriate language dependency, and, since Java 5, is incorrect.
Better to use the term "subtype", which is admittedly a bit vague at this stage, but can be more fully defined in 4.10.1.2.
Assertions about types in 4.9.2 are stated in terms of assignment compatibility (and, in one case, method invocation compatibility), but this introduces an inappropriate language dependency, and, since Java 5, is incorrect.
Better to use the term "subtype", which is admittedly a bit vague at this stage, but can be more fully defined in 4.10.1.2.