http://d.puremagic.com/issues/show_bug.cgi?id=9358
Summary: Compiler creates duplicate switch cases after an error
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic, pull
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-01-20
10:11:22 PST ---
void main()
{
double x;
switch (x)
{
case 1: break;
case 2: break;
default:
}
}
test.d(6): Error: 'x' must be of integral or string type, it is a double
test.d(8): Error: case must be a string or an integral constant, not 1
test.d(9): Error: case must be a string or an integral constant, not 2
test.d(9): Error: duplicate case 0 in switch statement
The last error message shouldn't appear.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------