mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
new inference: method reference constraint for the case of return type depends on type params (IDEA-122100)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
class InferenceExample<E> {
|
||||
public <Output> List<Output> convertAll(Function<E, Output> converter) {
|
||||
return invoke (MyArrayList::convertAll, converter);
|
||||
}
|
||||
|
||||
protected <A, R> R invoke(BiFunction<MyArrayList<E>, A, R> action, A arg) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public class MyArrayList<T> extends ArrayList<T> {
|
||||
public <Output1> List<Output1> convertAll(Function<T, Output1> converter) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user