mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
new inference: default constructor as poly expression argument
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
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 _(T t);
|
||||
}
|
||||
|
||||
class Foo<K> implements Fun<K, Integer> {
|
||||
@Override
|
||||
public Integer _(K k) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user