mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
22 lines
367 B
Java
22 lines
367 B
Java
class Main2 {
|
|
|
|
<R> void bar(Fun<Integer, R> collector) { }
|
|
|
|
<T, D> Fun<T, Integer> foo(D d) { return null; }
|
|
|
|
public void test() {
|
|
bar(new Foo<>());
|
|
}
|
|
|
|
interface Fun<T, R> {
|
|
R f(T t);
|
|
}
|
|
|
|
class Foo<K> implements Fun<K, Integer> {
|
|
@Override
|
|
public Integer f(K k) {
|
|
return null;
|
|
}
|
|
}
|
|
}
|