Comment # 8 on bug 178 from
(In reply to Jens Bauer from comment #7)
> I agree; CTFE is a good feature, indeed.
> Does this happen only for immutable assignments ?

and for array initialization. you'd better read some D book to get it right, as
i really bad at explanations. ;-) i "feel" it, but can't "word" it.


> I think that it all boils down to if there's a branch-back without any kind
> of conditional exit instruction in the generated code, it would work quite
> well (but would probably not be completely foolproof).

this will require deeper code analysis in frontend. it's doable, but i don't
know if someone will take that task.

in your case, however, CTFE engine should abort before even trying to evaluate
anything, as `void` is not a value suitable for array element. this check is
easier, and it worth filling a bug in DMD bugzilla.


You are receiving this mail because: