lambda: inference param types for assignment and cast context

This commit is contained in:
anna
2012-07-19 12:15:41 +02:00
parent 6b99ef5e9e
commit 5bb4a61bb9
9 changed files with 156 additions and 38 deletions

View File

@@ -27,13 +27,13 @@ class C {
}
void test() {
Simplest simplest = <weak_warning descr="Lambda expressions type check is not yet implemented">() -> { }</weak_warning>;
Simplest simplest = () -> { };
use(<weak_warning descr="Lambda expressions type check is not yet implemented">() -> { }</weak_warning>);
IntParser intParser = <weak_warning descr="Lambda expressions type check is not yet implemented">(String s) -> Integer.parseInt(s)</weak_warning>;
IntParser intParser = (String s) -> Integer.parseInt(s);
}
Runnable foo() {
return <weak_warning descr="Lambda expressions type check is not yet implemented">() -> { System.out.println("foo"); }</weak_warning>;
return () -> { System.out.println("foo"); };
}
}