The declaration of method(List<T> l)
does not specify any bounds on the type T. There is no guarantee that T is Number or a subclass of Number. Therefore, the compiler can only decide that this method calls overloadedMethod(Collection<?> o)
.
Remember: after compilation, the information about generics is not available anymore in the class files.