mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 18:50:54 +07:00
overload resolution: don't skip static method conflicts in classes in hierarchy (IDEA-171617)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import java.util.function.Function;
|
||||
import java.util.function.IntFunction;
|
||||
|
||||
class A {
|
||||
static void foo(Function<String, String> f) {}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
static void foo(IntFunction<String> f) {}
|
||||
|
||||
public static void main(String[] args) {
|
||||
<error descr="Ambiguous method call: both 'B.foo(IntFunction<String>)' and 'A.foo(Function<String, String>)' match">foo</error>(a -> "1");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user