mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
[java] method references overload resolution (IDEA-276614; IDEA-276613)
GitOrigin-RevId: a12beac2ccd0ecc2512c8b9feab5e04a868c3935
This commit is contained in:
committed by
intellij-monorepo-bot
parent
32ec2d9a30
commit
7c1c056980
@@ -0,0 +1,15 @@
|
||||
class Test {
|
||||
|
||||
static class A {
|
||||
void foo(A... as) {}
|
||||
static void foo(A a) {}
|
||||
}
|
||||
|
||||
interface I {
|
||||
void bar(A a);
|
||||
}
|
||||
|
||||
static void test() {
|
||||
I i = A::<error descr="Reference to 'foo' is ambiguous, both 'foo(A)' and 'foo(A...)' match">foo</error>;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
class Test {
|
||||
|
||||
static class A {
|
||||
void foo() {}
|
||||
static void foo(A a, A... as) {}
|
||||
}
|
||||
|
||||
interface I {
|
||||
void bar(A a);
|
||||
}
|
||||
|
||||
static void test() {
|
||||
I i = A::<error descr="Reference to 'foo' is ambiguous, both 'foo(A, A...)' and 'foo()' match">foo</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user