The lambda conversion and a lambda body that doesn't complete.
Rémi Forax
forax at univ-mlv.fr
Wed Mar 2 09:31:09 PST 2011
On 03/02/2011 06:21 PM, david.moss at ubs.com wrote:
> Well,
>
> At the very least it should be allowed because the following already is:
>
> interface I { int method(); }
>
> class C implements I {
> @Override
> public int method() {
> throw new RuntimeException("whatever");
> }
> }
>
>
> Kind Regards,
>
> David.
This is not an argument.
interface I {
<T> void m(T t);
}
...
I i = new I() {
<T> void m(T t) { ... }
}; // ok
I i = { <T> T t -> ... }; // not ok
I like to see lambdas as a more lightweight than inner classes.
Rémi
More information about the lambda-dev
mailing list