method refs: ambiguity with method refs inside

This commit is contained in:
anna
2012-10-01 20:52:39 +02:00
parent cb42e24da7
commit bd1f035718
4 changed files with 37 additions and 8 deletions
@@ -29,7 +29,7 @@ class MyTest {
{
Bar1 b1 = MyTest :: foo;
bar<error descr="Cannot resolve method 'bar(<method reference>)'">(MyTest :: foo)</error>;
bar<error descr="Ambiguous method call: both 'MyTest.bar(Bar1)' and 'MyTest.bar(Bar2)' match">(MyTest :: foo)</error>;
}
}
@@ -55,12 +55,12 @@ class StaticInner {
class StaticInner1 {
static class Inner {
Inner(StaticInner outer) {}
Inner(StaticInner1 outer) {}
Inner() {}
}
interface I1 {
Inner _(StaticInner rec);
Inner _(StaticInner1 rec);
}
interface I2 {
@@ -71,6 +71,6 @@ class StaticInner1 {
static void call3(I2 s) {}
static {
call3<error descr="Cannot resolve method 'call3(<method reference>)'">(StaticInner.Inner :: new)</error>;
call3<error descr="Ambiguous method call: both 'StaticInner1.call3(I1)' and 'StaticInner1.call3(I2)' match">(StaticInner1.Inner :: new)</error>;
}
}