[External] : Re: Pattern coverage

Brian Goetz brian.goetz at oracle.com
Thu Mar 24 18:49:44 UTC 2022


Right, in this model "default" clauses map to "any" patterns.  It 
doesn't (yet) deal with remainder, but that will come in a separate 
section.  This is all about static type checking.  Also, the last two 
rules probably leave out some of the generics support, but that's not 
essential to the model; we're mostly trying to make sure we understand 
what exhaustiveness is, in a way that it can be specified.



On 3/24/2022 1:56 PM, Remi Forax wrote:
> Thanks for sharing,
> in the text, they are several mentions of the default pattern but the 
> default pattern is not defined.
>
> Rémi
>
> ------------------------------------------------------------------------
>
>     *From: *"Brian Goetz" <brian.goetz at oracle.com>
>     *To: *"amber-spec-experts" <amber-spec-experts at openjdk.java.net>
>     *Sent: *Thursday, March 24, 2022 6:39:21 PM
>     *Subject: *Pattern coverage
>
>     I've put a document at
>
>     http://cr.openjdk.java.net/~briangoetz/eg-attachments/Coverage.pdf
>
>     which outlines a formal model for pattern coverage, including
>     record patterns and the effects of sealing. This refines the work
>     we did earlier.  The document may be a bit rough so please let me
>     know if you spot any errors.  The approach here should be more
>     amenable to specification than the previous approach.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20220324/1b1e1ef4/attachment-0001.htm>


More information about the amber-spec-experts mailing list