mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 17:07:05 +07:00
overload resolution: ensure all list of parameters is checked during most specific check of varargs methods (IDEA-150224)
This commit is contained in:
+21
@@ -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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user