hg: lambda/lambda/langtools: Bug fixes

maurizio cimadamore maurizio.cimadamore at oracle.com
Sat Sep 4 09:32:04 PDT 2010


  On 04/09/2010 07:21, Ali Ebrahimi wrote:
> Hi Maurizio,
> In Howard's sample code:
>
> il.forEach( #( notUsed ) { 0 } ); // OK
>
> il.forEach( #( notUsed ) { return 0; } ); // OK
>
> il.forEach( #( notUsed ) {  } ); // OK
>
>
> But:
>
> il.forEach( #( notUsed ) { return notUsed + 0; } ); // Need to catch
> the checked exception!
>
> il.forEach( #( notUsed ) { notUsed + 0; } ); // Need to catch the
> checked exception!
Hi Ali
these are ok (well, they can be improved, but the result is somewhat 
expected).
> il.forEach( #( notUsed ) { int j=0; return 0; } ); // Need to catch
> the checked exception!

This is weird, as the untyped parameter is not even used in the lambda 
body - in this case the inferencer should be able to determine that no 
exception is thrown by the lambda body... I will look into that...

Thanks
Maurizio
>
> Best Regards,
>
> Ali Ebrahimi
>



More information about the lambda-dev mailing list