Compiler should error when goto over initialization?

Jesse Phillips jessekphillips+D at gmail.com
Sun Sep 16 11:21:39 PDT 2012


I'm thinking I this is supposed to be a compiler error and I 
should report as a bug:

"It is illegal for a GotoStatement to be used to skip 
initializations."

     void main() {
         goto b;
         int num = 5;
     b:
         num = 7;
     }


More information about the Digitalmars-d-learn mailing list