On Sun, 26 Oct 2014 12:46:06 +0000
via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:

> The second possibility doesn't exist right now. The core problem 
> is that the compiler needs to be able to generate runtime code 
> for `buildWriter()`, because it's just a function after all.
but it's templated function, and it's never called in runtime, so
compiler never needs to generate code for it. seems that semantic
analysis prohibits such code before CTFE, and semantic analyser is
completely wrong here, 'case `fmt` *can* be read in compile-time.

actually, semantic analiser is wrong for any CTFE-able function in this
case, and it emits completely wrong error message (compile time
variable can't be read in compile time? how this can be true?).

i understand that it can be hard to fix semantic analyser though. ah,
but this limitation is so... limiting!

not sure if it worth the ER though. people seems to not write alot of
complex CTFE code anyway.

Attachment: signature.asc
Description: PGP signature

Reply via email to