mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
lambda: fix parameter types comparing order (IDEA-126056)
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class StreamTest {
|
||||
public class Foo {}
|
||||
|
||||
List<? super Foo> all = new ArrayList<>();
|
||||
|
||||
void foo(final Predicate<Object> predicate, final Stream<? super Foo> stream){
|
||||
long the_count= stream.filter((a) -> predicate.test(a)).count();
|
||||
}
|
||||
|
||||
void foo1(final Predicate<Object> predicate, final Stream<? extends Foo> stream){
|
||||
long the_count= stream.filter((a) -> predicate.test(a)).count();
|
||||
}
|
||||
|
||||
void foo2(final Predicate<Object> predicate, final Stream<Foo> stream){
|
||||
long the_count= stream.filter((a) -> predicate.test(a)).count();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user