Pattern matching: next steps after JEP 405
Brian Goetz
brian.goetz at oracle.com
Thu May 19 13:05:07 UTC 2022
>
> When you have a type pattern X in a middle of a pattern *and* you have
> conversions, then there is an ambiguity,
> does instanceof Box(X x) means
> Box(var v) && v instanceof X x
> or
> Box(var v) && X x = (X) v;
This is not an ambiguity in the language, it is confusion on the part of
the reader :)
In any case, I'm not following your argument here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20220519/d105cb18/attachment.htm>
More information about the amber-spec-experts
mailing list