mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-30 09:50:57 +07:00
18 lines
445 B
Java
18 lines
445 B
Java
class InferenceFailBug {
|
|
interface Func1<T1, R> {
|
|
R apply(T1 v1);
|
|
void other();
|
|
}
|
|
interface F1<T1, R> extends Func1<T1, R> {
|
|
default void other() {}
|
|
}
|
|
|
|
<T1, R> Func1<T1, R> func(F1<T1, R> f1) { return f1; }
|
|
|
|
interface Future<T> {
|
|
<R> Future<R> map(Func1<T, R> f1);
|
|
}
|
|
private Future<Integer> futureExample(Future<String> future) {
|
|
return future.map(func(s -> s.toUpperCase())).map(func(s -> s.length()));
|
|
}
|
|
} |