mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
new inference: process varargs as separate method candidate/separate phase
(cherry picked from commit fdd6f66268d29bb996a103f69180851b92947d21)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
class A<T> {
|
||||
A(T... t) {
|
||||
}
|
||||
|
||||
{
|
||||
A<String> a = new A<>("a", "b");
|
||||
foo(new A<>("", ""));
|
||||
bar(new A<>("", ""));
|
||||
bar(new A<>(get()));
|
||||
//bar(new A<>(get( ), ""));
|
||||
}
|
||||
|
||||
void foo(A<String> s) {}
|
||||
<T> void bar(A<T> s) {}
|
||||
|
||||
<K> K get() {return null;}
|
||||
|
||||
<M> A<M> s(M... m) {
|
||||
return null;
|
||||
}
|
||||
|
||||
{
|
||||
bar(s(get()));
|
||||
bar(s(get(), ""));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user