[Issue 602] Compiler allows a goto statement to skip an initalization
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Mar 30 11:06:46 PDT 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=602
------- Comment #1 from deewiant at gmail.com  2007-03-30 13:06 -------
Switch statements can also contain initializations prior to any case or
default. This is either a symptom of this bug, or an enhancement request. I'll
leave it here for now:
void main() {
        switch (1) {
                int x;
                case 1: assert (x == x.init);
        }
}
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list