Relates :
|
|
Relates :
|
javac accepts this case: class X { static <T,U extends Number> void f(T x) { } public static void main(String[] args) { f(new Integer(37)); } } It is claimed that, according to the spec, a type argument that cannot be inferred from the call is supposed to be given the type Object, but Object does not satisfy the bound of U; one would therefore expect a compiler to reject the code.
|