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

--- Comment #0 from 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
This restriction is nonsensical and should be removed.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to