mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-19 18:50:59 +07:00
Fixes IDEA-267865 Add a option for Java's method reference inspection that ignore lambda which can't convert into method reference without a cast GitOrigin-RevId: b6f762383d6ba1ef19a5de36e0ad53d107ba4e80
24 lines
450 B
Java
24 lines
450 B
Java
// "Replace lambda with method reference" "false"
|
|
import java.util.*;
|
|
class IDEA100385 {
|
|
void foo(N<Double> n, List<Double> l){
|
|
n.forEach((double e) -> {
|
|
l.ad<caret>d(e);
|
|
});
|
|
}
|
|
static interface N<E> {
|
|
default void forEach(DoubleConsumer consumer) {
|
|
}
|
|
void forEach(Consumer<? super E> consumer);
|
|
}
|
|
|
|
interface DoubleConsumer {
|
|
void _(double d);
|
|
}
|
|
|
|
interface Consumer<T> {
|
|
public void accept(T t);
|
|
}
|
|
|
|
}
|