[Issue 200] New: Statement *must* follow label
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Fri Jun 16 13:36:57 PDT 2006
d-bugmail at puremagic.com wrote:
> This one is pretty simple. The parser seems to think that the only valid way
> to use a label is if a statement directly follows it. But shouldn't a label be
> valid all by itself, if its the last line of a scope?
>
> void main(){
> x:
> }
[snip]
> The workaround for this one is dead simple: just use a ';' right after the
> label. IMO, that doesn't look like valid code.
Or, you know, you could just use "return" instead of "goto x" :P
More information about the Digitalmars-d-bugs
mailing list