overload resolution: symmetry (IDEA-143310)

This commit is contained in:
Anna Kozlova
2015-08-18 12:34:29 +02:00
parent 0504fd7f17
commit 676c477fab
4 changed files with 36 additions and 10 deletions
@@ -0,0 +1,11 @@
package pck;
public class A {
static void bar(Object a) {
System.out.println("A");
}
}
class B {
static void bar(Object a) {
System.out.println("B");
}
}
@@ -0,0 +1,9 @@
package pck;
import static pck.A.*;
import static pck.B.*;
class Test {
public static void main(String[] args) {
bar<error descr="Ambiguous method call: both 'A.bar(Object)' and 'B.bar(Object)' match">("")</error>;
}
}