-
Bug
-
Resolution: Unresolved
-
P4
-
5.0, 7, 8
The first step in resolving a method invocation is to identify a type to search. This is presented in 15.12.1 as a "class or interface" to search, despite the fact that many other types exist in the type system, with member methods of their own (per Chapter 4):
- A parameterized type or a raw type are not adequately represented with simply a "class or interface" -- the need for substitution/erasure needs to be conveyed
- An array type has methods, including 'clone' (10.7)
- A type variable has members that are _not_ the same as its upper bound (see 4.4); for example, private methods are not inherited
- An intersection type inherits members from a number of supertypes
Particularly troubling is this incorrect description of how method invocation on a type variable should be handled: "The class or interface to be searched is T if T is a class or interface type, or the upper bound of T if T is a type variable".
- A parameterized type or a raw type are not adequately represented with simply a "class or interface" -- the need for substitution/erasure needs to be conveyed
- An array type has methods, including 'clone' (10.7)
- A type variable has members that are _not_ the same as its upper bound (see 4.4); for example, private methods are not inherited
- An intersection type inherits members from a number of supertypes
Particularly troubling is this incorrect description of how method invocation on a type variable should be handled: "The class or interface to be searched is T if T is a class or interface type, or the upper bound of T if T is a type variable".