On Thu, Sep 1, 2016 at 6:29 PM, Stefan Koch via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote:
> On Thursday, 1 September 2016 at 13:18:18 UTC, Rory McGuire wrote: > >> the _checkCTFE() function is just a function that does something we're not >> allowed to do at CTFE, but current implementation does not respect >> __traits(compiles, ....); >> >> >> >> As far as I can tell that is a bug. Thoughts? >> > > It is not a bug, because there is no way to mark something as CTFE-only. > static ifs are not visible at the time where ctfe sees the function, they > have already been resolved. > > getting a static if (__ctfe) to work would require significant changes to > the semantic-analysis path for functions. > Ah, right, understood. is that in one of the "semantic" passes the compiler has?