Indeed, add(E) not applicable, but the question is less clear for the add(E...) method:
The Java language specification defines :
Method m is an applicable variable-degree method if and only if all of the following conditions are true:
For 1 β€ i <n, the type ei, Ai, can be converted by converting the method call to Si.
If k β₯ n, then for n β€ i β€ k the type ei, Ai can be converted by converting the method call to the component type Sn.
...
In our case, Sn is capture-of-? extends Number[] capture-of-? extends Number[] .
Now what is the type of component Sn? Unfortunately, JLS does not provide a formal definition for this term. In particular, he did not explicitly say whether the component type is a compile-time type (which does not need to be verifiable) or a runtime type (which should be). In the case of the first type of component will capture-or-? extends Number capture-or-? extends Number , which cannot accept the conversion of calling the Number through method. In the case of the latter, the component type will be Number , which obviously can.
It seems that the eclipse compiler developers used the former definition, while javac developers used the latter.
Two facts seem to imply that the type of the component is indeed a runtime type. First, spec requires :
If the type of the assigned value is not compatible with the destination (Β§5.2) with the type of the component, an ArrayStoreException is thrown.
If the type of the array component could not be verified (Β§4.7), the Java virtual machine could not perform the storage check described in the previous paragraph. This is why the expression to create an array with a non-resettable element type is forbidden (Β§15.10). You can declare an array type variable whose element type is not restored, but assigning the result of an array creation expression to a variable will necessarily lead to an uncontrolled warning (Β§5.1.9).
and secondly, the evaluation of the execution of a method invocation expression aimed at the method of the arity variable is determined as follows:
If m is called with k β n actual argument expressions or if m is called with k = n actual argument expressions, and the expression type k'th of the argument is not an assignment compatible with T [], then the list of arguments (e1, ... , en-1, en, ..., ek) is evaluated as if it were written as (e1, ..., en-1, new | T [] | {en, ..., ek}) where | T [] | deletes (Β§4.6) T [].
An accidental reading of this paragraph may lead to the idea that the expression is not only evaluated, but also verified in this way, but the specification does not quite say that.
On the other hand, a rather strange concept is to use erasure to check the type of compilation time (although the specification requires this in some other cases).
To summarize, the observed differences between the eclipse compiler and javac seem to be based on a slightly different interpretation of the type checking rules for non-recoverable variable method arguments.