lambda return type checks: consider void-compatible/value-compatible block

This commit is contained in:
Anna Kozlova
2012-08-20 16:59:18 +04:00
parent 9cdf03c1fd
commit b6a278b60f
5 changed files with 56 additions and 55 deletions
@@ -13,5 +13,10 @@ class Ambiguity1 {
{
m<error descr="Ambiguous method call: both 'Ambiguity1.m(I1)' and 'Ambiguity1.m(I2<Object>)' match">(()->{throw new AssertionError();})</error>;
m(() -> {});
m(() -> {
if (false) return;
throw new RuntimeException();
});
}
}