--- Comment #24 from 2012-01-18 16:06:09 PST ---
(In reply to comment #23)

> This wouldn't make sense - why should I be forced to add something just to 
> show
> I know that all the case values are compile-time constants?

Let's assume in one case you want the compiler to produce a very efficient
switch, maybe because you are writing the main loop of a little interpreter. In
this case you don't want one of the cases to be on a runtime value _by your
mistake_, because this may break this compiler optimization, forcing a less
efficient compilation of the switch. So to be sure you are not doing such
mistakes, you add an annotation to the switch, and the compiler catches your

In the end I agree this is probably not necessary, and it's better for switch
cases to be required to always be compile-time constants, losing a bit of
switch flexibility.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to