Exception catching not enforced

Howard Lovatt howard.lovatt at gmail.com
Sun Aug 22 00:14:45 PDT 2010


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?

  -- Howard.


More information about the lambda-dev mailing list