Summary: Too aggressive expansion for variables which have void
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Kenji Hara <> 2012-10-04 06:14:34 PDT ---
Current dmd aggressively expand const/immutable variables in optimization, but
it reports unuseful errors against void initialized variables.

This code should compile, but doesn't.

void main()
    int mx = void;
    const int cx = void;
    immutable int ix = void;
    mx = cx;   // Error: void initializer has no value
    mx = ix;   // Error: void initializer has no value

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

Reply via email to