switch bug

BCS ao at pathlink.com
Sat Mar 24 15:56:33 PDT 2007


import std.stdio;

void main(char[][] argv)
{
  switch("#!")
  {
    case "#!": writef("----Found #!\n");    break;
    case "\xFF\xFE"c:                       break;
    default:   writef("----Found ASCII\n"); break;
  }
}

On dmd 1.009 linux and win32 this prints "----Found ASCII". Drop the middle 
case and it prints "----Found #!".




More information about the Digitalmars-d-bugs mailing list