The current binary compatibility rules require the marked call
to be statically resolved to T2.m() at compile time, but to
generate T2a as the qualifying type in the binary. This results
in the wrong method being called at runtime.
//////////////////////////////////////////////////////////
import java.util.*;
import static java.lang.System.out;
public class T2 {
public static void main(String[] args) {
Collection c = T2a.m(new ArrayList<String>()); // => "T2a.m"
}
static Collection m(List<String> p) {
out.println("T2.m");
return null;
}
}
class T2a extends T2 {
static Collection m(List<Number> p) {
out.println("T2a.m");
return null;
}
}