Bug in switch around Enums?
Neal Gafter
neal at gafter.com
Fri Oct 5 12:02:36 PDT 2007
On 9/29/07, Brian Slesinsky <brian at slesinsky.org> wrote:
>
> Sure, support for constant expressions that return an enum seems like a
> win.
>
> It would also solve a different gotcha. This doesn't work:
>
> void doSwitch(MyEnum x) {
> switch (x) {
> case MyEnum.FOO:
> // do something
> }
> }
I'd be interested to see what modifications to the name lookup rules you
propose.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20071005/f896718d/attachment.html
More information about the compiler-dev
mailing list