method refs: do not cache results during parent conflict resolving

This commit is contained in:
anna
2012-10-04 18:19:00 +02:00
parent 129fdc6d44
commit 43ddd9311a
3 changed files with 18 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ class MyTest {
static {
foo(MyTest::m);
foo<error descr="Ambiguous method call: both 'MyTest.foo(I2)' and 'MyTest.foo(I3)' match">(MyTest::m1)</error>;
foo<error descr="Ambiguous method call: both 'MyTest.foo(I1)' and 'MyTest.foo(I2)' match">(MyTest::m1)</error>;
}
}

View File

@@ -111,5 +111,14 @@ class MyTest2 {
<error descr="Incompatible types. Found: '<method reference>', required: 'MyTest2.I2'">I2 s4 = MyTest2 ::m4;</error>
call2<error descr="'call2(MyTest2.I2)' in 'MyTest2' cannot be applied to '(<method reference>)'">(MyTest2::m4)</error>;
}
static void call3(I1 s) {}
static void call3(I2 s) {}
static {
call3(MyTest2::m1);
call3<error descr="Ambiguous method call: both 'MyTest2.call3(I1)' and 'MyTest2.call3(I2)' match">(MyTest2::m2)</error>;
call3(MyTest2::m3);
call3<error descr="Cannot resolve method 'call3(<method reference>)'">(MyTest2::m4)</error>;
}
}