mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 17:07:05 +07:00
new inference: distinguish return type type parameters and current session inference variables (IDEA-135001)
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class Test {
|
||||
private void foo(Function<? super Integer, Stream<Integer>> first) {
|
||||
Function<? super Integer, Object> second = first.andThen(s -> s.map(null));
|
||||
}
|
||||
|
||||
|
||||
private final Function<? super Integer, ? extends Stream<? extends Integer>> first =
|
||||
response -> Arrays.asList(response).stream().map(i -> i++);
|
||||
|
||||
private final Function<? super Integer, ? extends Stream<Map<String, Integer>>> second = first.andThen(
|
||||
mid -> mid.map(i -> {
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
map.put("key", i);
|
||||
return map;
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user