new inference: lift type parameters; stop inference after false appears in bounds

This commit is contained in:
Anna Kozlova
2014-02-12 12:45:14 +01:00
parent ea25e613a0
commit b16df9509f
4 changed files with 12 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ class NoLambda {
static <T> T id(T i2) {return i2;}
{
id(<error descr="Target type of a lambda conversion must be an interface">() -> {System.out.println("hi");}</error>);
id<error descr="'id(T)' in 'NoLambda' cannot be applied to '(<lambda expression>)'">(() -> {System.out.println("hi");})</error>;
NoLambda.<Runnable>id(() -> {System.out.println("hi");});
}
}