mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
overload resolution: don't ignore method with incorrect number of parameters when it overrides vararg method (IDEA-165829)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
interface TypeA {
|
||||
void test(String... arg);
|
||||
}
|
||||
|
||||
interface TypeB extends TypeA {
|
||||
void test(String[] arg);
|
||||
}
|
||||
|
||||
class Test {
|
||||
void foo(final TypeB typeB) {
|
||||
typeB.test<error descr="'test(java.lang.String[])' in 'TypeB' cannot be applied to '(java.lang.String, java.lang.String)'">("a", "b")</error>;
|
||||
typeB.test<error descr="'test(java.lang.String[])' in 'TypeB' cannot be applied to '(java.lang.String)'">("a")</error>;
|
||||
typeB.test<error descr="'test(java.lang.String[])' in 'TypeB' cannot be applied to '()'">()</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user