[Issue 11653] New: No error when forgetting break with range cases.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 30 09:05:16 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11653

           Summary: No error when forgetting break with range cases.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: shammah.chancellor at gmail.com


--- Comment #0 from Shammah Chancellor <shammah.chancellor at gmail.com> 2013-11-30 09:05:15 PST ---
void main()
{
  int test = 12412;
  int output = 0;
  switch(test)
  {
    case 1: case 100:
      output = 1;
      //break; //Oops..
    case 101: .. case 255:
      output = 2;
      break;
    default:
      output = 3;
  }
}

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


More information about the Digitalmars-d-bugs mailing list