Expression switch exception naming

Kevin Bourrillion kevinb at
Fri Mar 30 18:55:09 UTC 2018

On Fri, Mar 30, 2018 at 11:39 AM, Brian Goetz <brian.goetz at>

Okay, that is a sane approach, but I think it leaves too much of the value
>> on the floor. I often benefit from having my exhaustiveness validated and
>> being able to find out at compile time if things change in the future.
> To be clear, I was describing:
>  - We'd always do exhaustiveness checking for expression switches
>  - A default / total pattern always implies exhaustive
>  - We'd additionally consider an expression switch to be exhaustive if all
> known enums are present _and_ the enum type is in the same module as the
> switch

Confirming that this is indeed how I understood it. I think it throws too
much value out.

Kevin Bourrillion | Java Librarian | Google, Inc. | kevinb at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amber-spec-experts mailing list