mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
restrict anonym -> lambda: reject if return type would be changed (IDEA-154805)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
@@ -7,16 +8,19 @@ class A {
|
||||
ArrayList<String> strings = new ArrayList<String>();
|
||||
Stream<String> it = strings.stream();
|
||||
|
||||
int i = (int) it.flatMap(o -> {
|
||||
if ('a' > 2) {
|
||||
return StreamSupport.stream(getIterable().spliterator(), false);
|
||||
} else if ('c' < 123) {
|
||||
ArrayList<String> strings1 = new ArrayList<>();
|
||||
strings1.add(o);
|
||||
return strings1.stream();
|
||||
int i = (int) it.flatMap((o) -> StreamSupport.stream(new Function<String, Iterable<String>>() {
|
||||
@Override
|
||||
public Iterable<String> apply(String o) {
|
||||
if ('a' > 2) {
|
||||
return getIterable();
|
||||
} else if ('c' < 123) {
|
||||
ArrayList<String> strings1 = new ArrayList<>();
|
||||
strings1.add(o);
|
||||
return strings1;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}).count();
|
||||
}.apply(o).spliterator(), false)).count();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user