`case null:` (here we go)

Brian Goetz brian.goetz at oracle.com
Wed May 2 12:14:33 UTC 2018

I think this is a little too strong.  default is associated with switch, and we probably do need to massage switch’s handling of default, but we don’t need to make it a full blown pattern.  And we probably don’t want to; saying

    case Foo(default): …


    if (x instanceof Bar(default))

doesn’t make much sense.  So I agree it should be rehabilitated, but not by quite that much.

> Now that we have decided that the -> syntax doesn't allow fallthrough, i think we have no choice but to allow, default has a possible 'Pattern' in the grammar.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20180502/a729eb3d/attachment.html>

More information about the amber-spec-experts mailing list