Thread overview
CTFE error, but I have no idea what it means.
Mar 31, 2014
Olav Lindekleiv
Mar 31, 2014
bearophile
Mar 31, 2014
Olav Lindekleiv
Mar 31, 2014
Olav Lindekleiv
Apr 03, 2014
Kenji Hara
March 31, 2014
I've been experimenting with D for a little while now. For the most part, I've been able get help from the language/library reference and IRC. But not this time.

So here's the thing: http://dpaste.dzfl.pl/14680a8cec77

I've run it through Dustmite to reduce it to a smaller chunk of code. It runs just fine at runtime, but once I try to run "parseTemplate" during compile time/CTFE, it fails with this error:

/d815/f521.d(37): called from here: this.parser.parse() /d815/f521.d(77): called from here: parseTemplate("child2.html", genFileTable()) dmd: statement.c:293: ErrorStatement::ErrorStatement(): Assertion `global.gaggedErrors || global.errors' failed.

Usually when running into CTFE limitations, I've been able to understand what I'm doing wrong from the error messages, but this one doesn't make any sense to me.

I hope someone with more D experience can tell me what's going on here, and how to fix it.

Thanks,
Olav.
March 31, 2014
Olav Lindekleiv:

> I hope someone with more D experience can tell me what's going on here, and how to fix it.

It's a compiler bug. I suggest to minimize manually the example code as much as possible, and then add it to Bugzilla.

Bye,
bearophile
March 31, 2014
On Monday, 31 March 2014 at 11:02:24 UTC, bearophile wrote:
> Olav Lindekleiv:
>
>> I hope someone with more D experience can tell me what's going on here, and how to fix it.
>
> It's a compiler bug. I suggest to minimize manually the example code as much as possible, and then add it to Bugzilla.
>
> Bye,
> bearophile

I'm now down to 13 lines: http://dpaste.dzfl.pl/bbc84226a558

And it's the while(""){} that causes the compiler to crash. It isn't just "", but any string. I'll create an issue on Bugzilla for this.
March 31, 2014
Here's the issue: http://d.puremagic.com/issues/show_bug.cgi?id=12498

Please ignore the last example above, and look at the one in Bugzilla.

On Monday, 31 March 2014 at 11:08:18 UTC, Olav Lindekleiv wrote:
> On Monday, 31 March 2014 at 11:02:24 UTC, bearophile wrote:
>> Olav Lindekleiv:
>>
>>> I hope someone with more D experience can tell me what's going on here, and how to fix it.
>>
>> It's a compiler bug. I suggest to minimize manually the example code as much as possible, and then add it to Bugzilla.
>>
>> Bye,
>> bearophile
>
> I'm now down to 13 lines: http://dpaste.dzfl.pl/bbc84226a558
>
> And it's the while(""){} that causes the compiler to crash. It isn't just "", but any string. I'll create an issue on Bugzilla for this.

April 03, 2014
On Monday, 31 March 2014 at 11:51:50 UTC, Olav Lindekleiv wrote:
> Here's the issue: http://d.puremagic.com/issues/show_bug.cgi?id=12498

Fixed in git-head.

https://github.com/D-Programming-Language/dmd/commit/2c4d8ad711ccb7c94d349830523dd500580b0130

Kenji Hara