mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
captured wildcard in subtyping constraints: use upper bound only (IDEA-139046)
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
class Test {
|
||||
Map<String, String> foo(Stream<? extends String> stream) {
|
||||
return stream.collect(toMap(s -> s, s -> s));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user