new inference: stop collecting constraints if target type is proper (IDEA-136412)

This commit is contained in:
Anna Kozlova
2015-02-13 17:27:10 +01:00
parent 465879cacf
commit 853f9c567f
3 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
class Test {
private List<Map<String, String>> foo(Stream<Map.Entry<String, List<String>>> stream) {
return then(v -> stream.collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().toString())));
}
private <V> List<V> then(Function<Void, V> f) {
return null;
}
}