overload resolution: ensure all list of parameters is checked during most specific check of varargs methods (IDEA-150224)

This commit is contained in:
Anna Kozlova
2016-01-11 16:36:11 +01:00
parent 7e6b3916e8
commit 3baa03058b
3 changed files with 26 additions and 1 deletions
@@ -0,0 +1,21 @@
interface Node<<warning descr="Type parameter 'T' is never used">T</warning>> {
@SafeVarargs
static <T> Node<T> of(T value, Node<T>... children) {
System.out.println(value);
System.out.println(children);
return null;
}
@SafeVarargs
static <T1> Node<T1> of(T1... values) {
System.out.println(values);
return null;
}
static void test() {
Node.of(1, Node.of(2), Node.of(3));
Node.<Integer>of(1, Node.<Integer>of(2), Node.<Integer> of(3));
}
}