Call for bikeshed -- break replacement in expression switch
Brian Goetz
brian.goetz at oracle.com
Thu May 16 20:04:41 UTC 2019
The notion of “reserved word” is insufficiently precise. More precisely, yield is a _reserved type identifier_, like `var`. That means that you cannot have a class called `yield`, but you can have local variables, or methods, or fields, or type variables, with that name.
See
https://openjdk.java.net/jeps/8223002 <https://openjdk.java.net/jeps/8223002>
for further guidance on the fine degrees of shading between keywords, context-sensitive keywords, reserved identifiers, and reserved type names.
> On May 16, 2019, at 3:56 PM, Éamonn McManus <emcmanus at google.com> wrote:
>
> "yield" isn't a reserved word, is it? Doesn't that mean that
> `yield(5);` is ambiguous?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20190516/34341267/attachment.html>
More information about the amber-spec-experts
mailing list