mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
method refs: attempt to use parent to infer constructor type (IDEA-98846)
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class IDEA99970 {
|
||||
public static <T, C> Collector<T, C> toCollection(Supplier<C> collectionFactory) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> Collector<T, List<T>> toList() {
|
||||
return toCollection(ArrayList<T>::new);
|
||||
}
|
||||
|
||||
public static <T> Collector<T, List<T>> toList1() {
|
||||
return toCollection(ArrayList<T>::new);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface Supplier<T> {
|
||||
public T get();
|
||||
}
|
||||
|
||||
interface Collector<T, R> {}
|
||||
Reference in New Issue
Block a user