mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
inference: substitution for captures (IDEA-186844)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class ExceptionStream {
|
||||
|
||||
void foo(Supplier<Stream<String>> mapper) {
|
||||
bar(flatMap (transform(mapper)));
|
||||
}
|
||||
|
||||
<R> Stream<R> flatMap(Supplier<? extends Stream<R>> mapper) {
|
||||
return null;
|
||||
}
|
||||
|
||||
void bar(Stream<String> s) {}
|
||||
|
||||
<T> Supplier<? extends T> transform(Supplier<T> function) {
|
||||
return function;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user