On 09/01/2016 11:01 PM, Rory McGuire via Digitalmars-d-announce wrote:
I'm actually asking why we can't catch the ctfe error.


There is no CTFE error in your example. It doesn't compile in the first place, even without attempting any CTFE.

[...]
Surely the ctfe engine could be changed to catch unsupported code
errors. (Not invalid, just unsupported at CT).

Maybe. It isn't obvious to me that it would be a good idea, but it's not obviously terrible either.

The ctfe engine would have to "go past" the try anyway, right? This is
the part I don't understand. Is it because ctfe actually hasn't started
yet and some other analysis is freaking out?

It's just a compiler error. The snippet on its own fails compilation and there is no CTFE in there. Something like `static assert(_checkCTFE());` would involve CTFE. But that's not needed to trigger the error.

Reply via email to