> On Sep 1, 2020, at 8:22 AM, Brian Goetz <[email protected]> wrote: > > But, there is a subtle difference between > > switch (x) { > case FOO: ... > } > > and > > sealed switch (x) { > case FOO: .... > default: // nothing > } > > which is, what happens on remainder. In the former, it is just another > ignored non-matching input; in the latter, we throw.
Confused here. Doesn't 'default' handle the remainder explicitly? Under what conditions does your sealed switch throw? The way I'm modeling remainder handling in my head is that sealed switches without 'default' get an implicit 'default' clause that throws. (And, for that matter, regular switches without 'default' get an implicit 'default' that is a no-op.)
