Next up for patterns: type patterns in switch
John Rose
john.r.rose at oracle.com
Fri Jul 24 01:20:20 UTC 2020
On Jul 23, 2020, at 2:53 PM, Remi Forax <forax at univ-mlv.fr> wrote:
>
> var x and default are not on the same plane. So it's not really a third thing.
> We are introducing something special for the bottom, null, but not for the top ?
Eh; null doesn’t need to be that special, but Brian’s point is that
you can just mandate that it appears at the top or nowhere.
If you don’t mandate that, then type-coverage checks ensure
that a “case null” which appears after a nullable case (a total
one) will be not-reachable, and a static error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20200723/0129c002/attachment.htm>
More information about the amber-spec-experts
mailing list