Why a new type parameter for exception transparency?
Neal Gafter
neal at gafter.com
Wed Nov 18 21:02:42 PST 2009
On Wed, Nov 18, 2009 at 8:41 PM, Paul Benedict <pbenedict at apache.org> wrote:
> But really, the compiler should know what to do just with this:
>
> public <E extends Exception> void throwit(E e) throws E {
> throw e;
> }
>
> I might be missing something, but is there any important distinction
> between the two?
>
Not in this case. The important cases are where the compiler has to combine
exceptions that may be thrown from multiple places. You want type inference
to form a disjunction type then, not find the common supertype.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091118/e11a52b5/attachment-0001.html
More information about the closures-dev
mailing list