Battle-plan for CTFE

Stefan Koch via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Oct 30 14:19:00 PDT 2016


On Sunday, 30 October 2016 at 21:09:19 UTC, Stefan Koch wrote:
> On Sunday, 30 October 2016 at 03:07:13 UTC, Stefan Koch wrote:
>> I just made progress on another fundamental feature,
>> function call support.
>>
>> It's does not [fully] work yet, but it shows promise.
>
> The following just compiled :
> int fn(int a)
> {
>     return a + fn2(2);
> }
>
>
> int fn2(int a)
> {
>     return a + 2;
> }
>
> static assert(fn2(4) == 6);
> static assert(fn(4) == 8);
> static assert(fn(fn(2)) == 10);

Oh shoot!
I did not enable the new call system :(
This computed by the old interpreter.

The new engine fails :(



More information about the Digitalmars-d-announce mailing list