www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - switch bug

reply BCS <ao pathlink.com> writes:
import std.stdio;

void main(char[][] argv)
{

  {

    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 

Mar 24 2007
parent Lionello Lunesu <lio lunesu.remove.com> writes:
BCS wrote:
 import std.stdio;
 
 void main(char[][] argv)
 {

  {

    case "\xFF\xFE"c:                       break;
    default:   writef("----Found ASCII\n"); break;
  }
 }
 
 On dmd 1.009 linux and win32 this prints "----Found ASCII". Drop the 

 
 
I can confirm this bug (dmd 1.010, win32) L.
Mar 26 2007