mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 04:21:24 +07:00
method references: do not prefer varargs from first search (IDEA-182018)
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import java.util.function.BinaryOperator;
|
||||
|
||||
class Test {
|
||||
static class Base<T> {
|
||||
Child<T> prepend(Child<T> other) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static class Child<T> extends Base<T> {
|
||||
@SafeVarargs
|
||||
final Child<T> prepend(T... args) {
|
||||
return this;
|
||||
}
|
||||
|
||||
Child<T> prepend(T arg) {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
BinaryOperator<Child<String>> prepend = Child::prepend;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user