lambda: infer from return type; cyclic inference stop

This commit is contained in:
Anna Kozlova
2012-08-10 22:41:35 +04:00
parent bff2c6d55c
commit 5ba5425a54
22 changed files with 642 additions and 207 deletions

View File

@@ -7,11 +7,11 @@ class NoInferenceResult {
<T> void m1(T t) { }
void test() {
m<error descr="'m(I<java.lang.Object,java.lang.Object>)' in 'NoInferenceResult' cannot be applied to '(<lambda expression>)'">((String s1) -> (String s2) -> s1 + s2)</error>;
m((String s1) -> <error descr="Cyclic inference">(String s2) -> s1 + s2</error>);
m((String s1) -> s1.length());
m((String s1) -> s1);
m1<error descr="'m1(java.lang.Object)' in 'NoInferenceResult' cannot be applied to '(<lambda expression>)'">(() -> { })</error>;
m1(<error descr="Cyclic inference">() -> { }</error>);
}
}