mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-03 15:50:52 +07:00
new inference: lift containing class type parameters for method references
(cherry picked from commit a341be1196484b6e4c33a7d10059d2bec5bdf955)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import java.util.List;
|
||||
|
||||
class Test {
|
||||
|
||||
interface Function<X, Y> {
|
||||
Y m(X x);
|
||||
}
|
||||
|
||||
interface Node<E> {
|
||||
List<E> foo();
|
||||
}
|
||||
|
||||
class Data<T, I> {
|
||||
Data(I state, Function<I, List<T>> fun) { }
|
||||
}
|
||||
|
||||
<O> Data<O, Node<O>> test(Node<O> collection) {
|
||||
return new Data<>(collection, Node::foo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user