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
@@ -7,7 +7,7 @@ class Test {
void call(I2 p) { }
void test() {
call<error descr="Ambiguous method call: both 'Test.call(I1)' and 'Test.call(I2)' match">(() -> { throw new RuntimeException(); })</error>;
call(() -> { throw new RuntimeException(); });
call(() -> { if (true) return ""; throw new RuntimeException(); });
call(() -> { if (true) return; throw new RuntimeException(); });
}