mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
java 8 diamonds: include constructor's type parameters in inference constraints (IDEA-160918)
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class RunnableGroup<R extends Runnable> implements Runnable {
|
||||
public <T> RunnableGroup(List<T> list, Function<T, R> function) {}
|
||||
@Override public void run() {}
|
||||
}
|
||||
|
||||
class Usage {
|
||||
|
||||
public static void m(List<Integer> list,
|
||||
Function<Integer, Runnable> function) {
|
||||
run(new RunnableGroup<>(list, function));
|
||||
}
|
||||
|
||||
static <K extends Runnable> K run(K runnable) { return runnable; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user