mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-03 15:50:52 +07:00
method references overload resolution: skip static methods of interfaces called on inheritor (IDEA-209920)
GitOrigin-RevId: 9e7889def32913679fa867f9dd2a80f8d187964e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d3928de54b
commit
7a03a2be5c
@@ -0,0 +1,33 @@
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
class Main {
|
||||
|
||||
void m(B b) {
|
||||
Function<A<String>, String> f1 = A<String>::getName;
|
||||
Function<A<String>, String> f10 = A::getName;
|
||||
Function<B, String> f2 = B::getName;
|
||||
Function<B, String> f3 = b::<error descr="Cannot resolve method 'getName'">getName</error>;
|
||||
}
|
||||
}
|
||||
|
||||
interface I {
|
||||
String getName();
|
||||
|
||||
static String getName(final I i) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
class A<T> implements I {
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class B implements I {
|
||||
@Override
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user