CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 30 07:15:55 PST 2017


New bugs incoming:

uint fn(uint a)
{
     final switch(a)
     {
         case 1 : {

             while(a < 20)
//          bool whileCondition;
//            WhileBlockEvalCond :
//            whileCondition = (a < 20);
             {
//                WhileBlockBegin:
                 a++;
                 if (a == 17) break;
/*
                 WhlieBlockEnd:
                     if(!whileCondition)
                        goto WhileBlockAfter
                 // break seems to go here :-/
                 goto WhileBlockEvalCond;
                 // break should go here!
*/
             }
//             WhileBlockAfter:
                 return a;
         }
     }

     return 1;
}

pragma(msg, fn(1)); // should print 17
when executed with with newCTFE this will print 20



More information about the Digitalmars-d mailing list