http://d.puremagic.com/issues/show_bug.cgi?id=6169
Summary: [CTFE] pure functions cannot compute constants using functions not marked as pure Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: timon.g...@gmx.ch --- Comment #0 from timon.g...@gmx.ch 2011-06-16 17:09:25 PDT --- With DMD 2.053: string impure(){return ";";} void main() pure{ enum s = impure(); // fail (cannot call impure function 'impure') mixin(impure()); // ditto } Removing the pure attribute from 'main' or adding it to 'impure' makes the code pass. This restriction is nonsensical and should be removed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------