Switch expressions spec
John Rose
john.r.rose at oracle.com
Fri Mar 15 19:06:50 UTC 2019
On Mar 15, 2019, at 12:01 PM, John Rose <john.r.rose at oracle.com> wrote:
>
> How do you type "f(throw e)"?
P.S. I suppose this EG has already considered that question,
but here's one answer that occurred to after hitting send:
"throw e" is sugar for an unconstrained poly expression,
approximately:
static <any X, T extends Throwable>
X throwMe(T t) throws T { throw T; }
… throwMe(e)
More information about the amber-spec-experts
mailing list