[Issue 14411] New: switch statement: docs/behavior differ
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Apr 5 06:31:25 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14411
Issue ID: 14411
Summary: switch statement: docs/behavior differ
Product: D
Version: D2
Hardware: All
OS: Mac OS X
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: cody.casterline+dlang at gmail.com
Created attachment 1507
--> https://issues.dlang.org/attachment.cgi?id=1507&action=edit
example case
http://dlang.org/statement.html#SwitchStatement says:
"A ScopeStatementList must either be empty, or be ended with a
ContinueStatement, BreakStatement, ReturnStatement, GotoStatement,
ThrowStatement or assert(0) expression unless this is the last case. This is to
set apart with C's error-prone implicit fall-through behavior."
And yet, implicit fall-through behavior is what I'm seeing with this example.
(attached)
--
More information about the Digitalmars-d-bugs
mailing list