new inference: provide diagnostics on failed inference (checked exceptions)

This commit is contained in:
Anna Kozlova
2015-11-23 12:28:31 +01:00
parent cf9c60e06b
commit e7d095d85f
4 changed files with 42 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ class Test5 {
static <T> void bar(I<T> i){}
{
bar(() -> <error descr="Bad return type in lambda expression: <null> cannot be converted to void">null</error>);
bar(<error descr="Incompatible parameter types in lambda expression">() -> null</error>);
}
}
class Test6 {
@@ -31,7 +31,7 @@ class Test6 {
static <T> void bar(I<T> i){}
{
bar(() -> <error descr="Bad return type in lambda expression: <null> cannot be converted to void">null</error>);
bar(<error descr="Incompatible types: expected void but the lambda body is neither a statement expression nor a void-compatible block">() -> null</error>);
bar(() -> {});
}
}