Switch case falltrhough, regression or intended behavior ?

Andrej Mitrovic andrej.mitrovich at gmail.com
Sun Feb 17 17:10:00 PST 2013


On 2/18/13, Stewart Gordon <smjg_1998 at yahoo.com> wrote:
> There's no such thing as an "empty case statement", unless you mean the case
> where the
> ScopeStatementList is ";" or "{}" by itself.  Look at the grammar
> carefully.
>
> So by the current spec, the first example is a syntax error, since a
> CaseStatement
> explicitly forbids another CaseStatement as its body.

The grammar and spec are often broken. The OP sample is completely valid.


More information about the Digitalmars-d mailing list