new overload resolution: don't treat array type of functional interfaces as functional interface (IDEA-148726)

This commit is contained in:
Anna Kozlova
2015-12-02 16:57:49 +01:00
parent 80ff639c5d
commit e8111b751e
3 changed files with 24 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
class Test {
private static <T> void test(Class<T> cls, Runnable... objs) {
System.out.println(cls);
System.out.println(objs);
}
private static <K> void <warning descr="Private method 'test(K, java.lang.Runnable...)' is never used">test</warning>(K obj, Runnable... objs) {
System.out.println(obj);
System.out.println(objs);
}
public static void main(String[] args) {
test(String.class, new Runnable[1]);
}
}