overload resolution: skip static correctness check during overload resolution (IDEA-154187)

This commit is contained in:
Anna.Kozlova
2016-04-06 12:49:01 +02:00
parent c35fa1891b
commit 1bc380f6fd
3 changed files with 20 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
class A<T> {
public void testMethod(T... values) {}
public void testMethod1(T values) {}
}
class B extends A<Integer> {
public static void testMethod(String... values) {}
public static void testMethod1(String values) {}
}
class Test45 {
public static void main(String[] args) {
B.testMethod<error descr="Ambiguous method call: both 'B.testMethod(String...)' and 'A.testMethod(Integer...)' match">()</error>;
B.testMethod1<error descr="Ambiguous method call: both 'B.testMethod1(String)' and 'A.testMethod1(Integer)' match">(null)</error>;
}
}