Exception catching not enforced
maurizio cimadamore
maurizio.cimadamore at oracle.com
Sun Aug 22 10:47:36 PDT 2010
On 22/08/2010 08:14, Howard Lovatt wrote:
> For the extension method:
>
> <throws E> extension void forEach( Method1<T, T, E> method ) throws
> E default Trait.forEach;
>
> Called with:
>
> il.forEach( #( i ) {
> if ( i< 3 ) { throw new Exception(); }
> return i * i;
> } ); // Should need to catch checked exception
>
>
> Without a try catch block around it compiles. Presumably it shouldn't?
>
Yeah, it shouldn't - this is a bug.
Thanks
Maurizio
> -- Howard.
>
>
More information about the lambda-dev
mailing list