The lambda conversion and a lambda body that doesn't complete.

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Mar 1 09:59:37 PST 2011


On 01/03/11 17:35, Neal Gafter wrote:
> *interface F {
>     int invoke();
> }*
>
> I would like to be able to write
>
> *F x = #{ throw new Exception(); };*
This works with lambda compiler:

interface F {
     int invoke();
}

class Test {
    F x = #{ throw new Exception(); };

    public static void main(String[] args) {
       new Test().x.invoke();
    }
}

Are you saying that the spec is not in sync with this?

Maurizio



More information about the lambda-dev mailing list