mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
Fix IDEA-177668 "Replace stream chain with loop" exception on unresolved collection type
This commit is contained in:
+9
@@ -113,6 +113,15 @@ public class Main {
|
||||
return integers;
|
||||
}
|
||||
|
||||
// Unresolved reference
|
||||
void f(Collection<? extends Foo> c) {
|
||||
R treeSet = new TreeSet();
|
||||
for (Foo foo : c) {
|
||||
treeSet.add(foo);
|
||||
}
|
||||
Set<Foo> uniqueDescriptors = treeSet;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Main().testAveragingDouble("a", "bbb", null, "cc", "dd", "eedasfasdfs");
|
||||
new Main().testAveragingInt("a", "bbb", null, "cc", "dd", "eedasfasdfs");
|
||||
|
||||
+6
@@ -46,6 +46,12 @@ public class Main {
|
||||
return IntStream.of(4, 2, 1).boxed().collect(Collectors.toCollection(TreeSet::new));
|
||||
}
|
||||
|
||||
// Unresolved reference
|
||||
void f(Collection<? extends Foo> c) {
|
||||
Set<Foo> uniqueDescriptors = c.stream()
|
||||
.collect(Collectors.toCollection(() -> new TreeSet()));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Main().testAveragingDouble("a", "bbb", null, "cc", "dd", "eedasfasdfs");
|
||||
new Main().testAveragingInt("a", "bbb", null, "cc", "dd", "eedasfasdfs");
|
||||
|
||||
Reference in New Issue
Block a user