mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 10:51:25 +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 {;}
|
||||
}
|
||||
+1
-1
@@ -16,7 +16,7 @@ class MyTest<T> {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<E> add(E... elements) {
|
||||
public Builder<E> add(E... <warning descr="Parameter 'elements' is never used">elements</warning>) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user