mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
method reference: don't start containing class parameter type inference for receiver-reference; corresponding substitutor should be already known (IDEA-146604; IDEA-147223)
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.function.BinaryOperator;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
class C {
|
||||
private static void foo(final Stream<Predicate<Boolean>> stream) {
|
||||
BinaryOperator<Predicate<Boolean>> bo = Predicate::and;
|
||||
Predicate<Boolean> notWorking = stream.reduce(Predicate::and).orElse(t -> true);
|
||||
}
|
||||
|
||||
public static void bar(Stream<E> stream) {
|
||||
Object[] array = stream
|
||||
.sorted(Enum::compareTo)
|
||||
.toArray();
|
||||
System.out.println("array = " + Arrays.toString(array));
|
||||
}
|
||||
enum E {;}
|
||||
}
|
||||
Reference in New Issue
Block a user