new inference: overload resolution for SAM return type for implicit lambda should be ignored

This commit is contained in:
anna
2013-09-25 16:07:57 +02:00
parent 66926021e9
commit f5257087e9
19 changed files with 43 additions and 39 deletions

View File

@@ -8,13 +8,13 @@ class NoLambda {
void bazz() {
bar(null);
bar(<error descr="Cyclic inference">(z)-> {System.out.println();}</error>);
bar((z)-> {System.out.println();});
}
static <T> T id(T i2) {return i2;}
{
id(<error descr="Cyclic inference">() -> {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");});
}
}