http://d.puremagic.com/issues/show_bug.cgi?id=3376

           Summary: [tdpl] Multiple ranged case labels don't work
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu <and...@metalanguage.com> 2009-10-08 
12:00:23 PDT ---
void classify(char c) {
   write("You passed ");
   switch (c) {
      case '#': 
         writeln("a hash sign."); 
         break;
      case '0': .. case '9': 
         writeln("a digit."); 
         break;
      case 'A': .. case 'Z': case 'a' .. case 'z': 
         writeln("an ASCII character."); 
         break;
      case '.', ',', ':', ';', '!', '?': 
         writeln("a punctuation mark."); 
         break;
      default:
         writeln("quite a character!");
         break;
   }
}

The code fails to compile. If I change the line:

      case 'A': .. case 'Z': case 'a' .. case 'z': 

to:

      case 'A': .. case 'Z':

then it compiles.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to