CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Tue Jan 31 03:17:48 PST 2017


On Monday, 30 January 2017 at 15:15:55 UTC, Stefan Koch wrote:
> 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

This bug is fixed now!!
it was a simple oversight were the mechanism I build to deal with 
this was simply not invoked.
Luckily not a failure of the mechanism itself.


More information about the Digitalmars-d mailing list