[java] method references overload resolution (IDEA-276614; IDEA-276613)

GitOrigin-RevId: a12beac2ccd0ecc2512c8b9feab5e04a868c3935
This commit is contained in:
trushev
2021-08-27 12:34:00 +02:00
committed by intellij-monorepo-bot
parent 32ec2d9a30
commit 7c1c056980
4 changed files with 70 additions and 16 deletions

View File

@@ -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>;
}
}

View File

@@ -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>;
}
}