[Issue 14411] switch statement: docs/behavior differ

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Apr 5 10:19:50 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14411

--- Comment #3 from Cody Casterline <cody.casterline+dlang at gmail.com> ---
> specs says nothing about other cases.

Well, it says that ScopeStatementList "must" be empty, or be ended [...]. Which
I read to mean there are no other cases.   "This is to set apart with C's
error-prone implicit fall-through behavior." so I would not expect fall-through
to work like in C.  

>  "case 1, 2:" is not what you may think, it equals to "case 2:".

Oh? Then why did fn(1) run "A"?

--


More information about the Digitalmars-d-bugs mailing list