switch bug
BCS
ao at pathlink.com
Sat Sep 15 10:45:57 PDT 2007
I have a switch somthing like this:
void main(char[][] args)
{
foreach(arg,args)
if(arg.length >= 2)
switch(arg[0..2])
{
case "-?": ... break;
case "-a": ... break;
case "-b": ... break;
case "-c": ... break;
default: ... break;
}
}
when given "-a" it goes to the default
(This is not the exact case so don't expect it to exhibit the bug, I'll try
to get a minimal test case later today)
This is not the first time I have found this bug. It seems to be a code gen
issue because adding no-op lines (i = i;) has fixed it in the past.
More information about the Digitalmars-d-bugs
mailing list