Bug 4100 – Break and continue to label should mention foreach

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-04-17T10:55:00Z
Last change time
2014-02-15T02:43:44Z
Keywords
spec
Assigned to
nobody
Creator
jlquinn

Comments

Comment #0 by jlquinn — 2010-04-17T10:55:19Z
Both break and continue can branch to a label, but the text only mentions for, while, and do loops. Foreach loops should also be included. Dmd supports it.
Comment #1 by ellery-newcomer — 2010-04-17T12:24:56Z
(In reply to comment #0) > Both break and continue can branch to a label, but the text only mentions for, > while, and do loops. Foreach loops should also be included. Dmd supports it. It's mentioned just above the switch statement
Comment #2 by jlquinn — 2010-04-17T13:27:29Z
(In reply to comment #1) > (In reply to comment #0) > > Both break and continue can branch to a label, but the text only mentions for, > > while, and do loops. Foreach loops should also be included. Dmd supports it. > > It's mentioned just above the switch statement The text for ContinueStatement is: If continue is followed by Identifier, the Identifier must be the label of an enclosing while, for, or do loop, and the next iteration of that loop is executed. It is an error if there is no such statement. It doesn't mention foreach and it should. Ditto with BreakStatement.
Comment #3 by bugzilla — 2010-05-05T10:56:28Z
changeset 1497
Comment #4 by clugdbug — 2010-05-18T12:18:59Z
Fixed DMD1.061 and DMD2.046.