mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-18 18:31:55 +07:00
481bc252f3
(cherry picked from commit d2cbf3f2833104c3a0381059b0d6ef8ac0b3c94c)
34 lines
553 B
Java
34 lines
553 B
Java
class MyTest<E> {
|
|
MyTest(E e) {
|
|
}
|
|
|
|
interface I<T> {
|
|
MyTest<T> _(T t);
|
|
}
|
|
|
|
static <Y> void bar(Y arg, I<Y> i) {
|
|
i._(arg);
|
|
}
|
|
|
|
static <Y> void bar(I<Y> i, Y arg) {
|
|
i._(arg);
|
|
}
|
|
|
|
static <Y> void bar(I<Y> i) {
|
|
i._(null);
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
I<String> i = MyTest::new;
|
|
|
|
bar("", MyTest<String>::new);
|
|
bar("", MyTest::new);
|
|
|
|
bar(MyTest<String>::new, "");
|
|
bar(MyTest::new, "");
|
|
|
|
bar(MyTest::new);
|
|
bar(MyTest<String>::new);
|
|
}
|
|
}
|