https://issues.dlang.org/show_bug.cgi?id=19268
--- Comment #12 from Adam D. Ruppe <[email protected]> --- (In reply to Steven Schveighoffer from comment #9) > Except this is not the problem. The CTFE part DOES compile. eeeeh, it is the problem that brought me to this bug. private string makefoo() { if(__ctfe) { string a = "b"; a ~= "c\0"; return a; } assert(0); } enum foo = makefoo(); extern(C) int main() { import core.stdc.stdio; printf("%s", foo.ptr); return 0; } Here that private function is obviously intended to be CTFE only - the `private` and `if(__ctfe)` make that extremely clear to a human reader, but the compiler doesn't get the hint. We could also do a like `pragma(ct_only)` maybe just I was hoping this pattern would work since it is in the existing language. But nope :( --
