[Issue 9358] New: Compiler creates duplicate switch cases after an error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 20 10:11:22 PST 2013
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: andrej.mitrovich at gmail.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list