[Issue 1118] weird switch statement behaviour

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 9 16:41:16 PDT 2007


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





------- Comment #3 from shro8822 at uidaho.edu  2007-04-09 18:41 -------
Not having a case might not be a problem: tuples can be foreached to generate
cases and a zero length tuple might be valid. You would however expect their to
be a default in that case.

int Foo(A...)(int i)
{
 switch(i)
 {
  default:
   // code
   break;
  foreach(a;A)
  {
   case a:
    // code
    // break;
  }
 }
}


-- 



More information about the Digitalmars-d-bugs mailing list