[Issue 200] Statement *must* follow label
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 19 07:42:54 PDT 2006
http://d.puremagic.com/issues/show_bug.cgi?id=200
smjg at iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
------- Comment #1 from smjg at iname.com 2006-06-19 09:42 -------
The spec gives:
LabelledStatement:
Identifier ':' Statement
i.e. a label prefixes a statement - it doesn't act as a statement by itself.
(In reply to comment #0)
> The workaround for this one is dead simple: just use a ';' right after the
> label. IMO, that doesn't look like valid code.
Indeed, it isn't according to the spec, and for good reasons. Use an empty
BlockStatement instead.
void main() {
x: {}
}
--
More information about the Digitalmars-d-bugs
mailing list