October 30, 2016 Re: Battle-plan for CTFE | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | 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);
|
October 30, 2016 Re: Battle-plan for CTFE | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | 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 :(
|
October 31, 2016 Re: Battle-plan for CTFE | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch Attachments:
| On 10/30/2016 11:19 PM, Stefan Koch wrote:
> Oh shoot!
> I did not enable the new call system :(
> This computed by the old interpreter.
>
> The new engine fails :(
Stefan, would you mind creating a dedicated topic in main D newsgroup to report your development progress? Bumping the thread in announce NG like that is rather distracting, we should aim for posting only most important/relevant info there.
|
Copyright © 1999-2021 by the D Language Foundation