Given this example from the generics tutorial.
List list = new ArrayList<>();
list.add(\"A\");
// The following statement should fail si
When compiling a method invocation, javac needs to know the type of the arguments first, before determining which method signature matches them. So the method parameter type isn't known before the argument type is known.
Maybe this can be improved; as of today, the type of the argument is independent of the context.