Updated patterns-in-switch doc
forax at univ-mlv.fr
Sun Sep 13 10:35:55 UTC 2020
At the end of the section "refining-totality" ,
The sentence "Guarded patterns should be ignored entirely for purposes of computing totality." implies that if two patterns that only differ from one having a where and the other have not it's not valif to have them both in a switch seems wrong for me.
By example, a switch like this is illegal
case Bar bar where bar.x == 0 -> ...
case Bar bar -> ...
I believe that what we want is to consider that a pattern with a where clause is considered as a "subtype" of the pattern without a where clause, whatever the where clause is exactly.
> De: "Brian Goetz" <brian.goetz at oracle.com>
> À: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
> Envoyé: Mardi 8 Septembre 2020 18:43:01
> Objet: Updated patterns-in-switch doc
> I have updated
> based on our discussions.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the amber-spec-experts