[Issue 13321] New: Wrong goto skips declaration error
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 18 07:26:46 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13321
Issue ID: 13321
Summary: Wrong goto skips declaration error
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Keywords: diagnostic, rejects-valid
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: bearophile_hugs at eml.cc
Reduced from a post by nrgyzer:
struct Foo {
this(int) {}
}
void main(string[] args) {
Foo x;
if (args.length > 1)
goto EXIT;
x = Foo(1);
EXIT:
}
2.067alpha gives an error message that I think is spurious (rejects-valid):
test.d(7,9): Error: goto skips declaration of variable test.main.__ctmp1 at
test.d(8,12)
--
More information about the Digitalmars-d-bugs
mailing list