new inference: most specific check according to spec, fixed testdata after JDK-8043734

This commit is contained in:
Anna Kozlova
2014-09-04 13:45:03 +04:00
parent 3dad9a1725
commit 33f7cb51f2
4 changed files with 3 additions and 10 deletions
@@ -12,7 +12,7 @@ class Ambiguity1 {
static <T> void m(I2<T> i2) {}
{
m<error descr="Ambiguous method call: both 'Ambiguity1.m(I1)' and 'Ambiguity1.m(I2<Object>)' match">(()->{throw new AssertionError();})</error>;
m(()->{throw new AssertionError();});
m(() -> {});
m(() -> {
if (false) return;
@@ -22,6 +22,6 @@ class AmbiguityRawGenerics {
<Z> void foo(I3<Z> s) { }
void bar() {
foo<error descr="Ambiguous method call: both 'AmbiguityRawGenerics.foo(I)' and 'AmbiguityRawGenerics.foo(I1)' match">(()-> { throw new RuntimeException(); })</error>;
foo<error descr="Ambiguous method call: both 'AmbiguityRawGenerics.foo(I1)' and 'AmbiguityRawGenerics.foo(I2)' match">(()-> { throw new RuntimeException(); })</error>;
}
}