http://d.puremagic.com/issues/show_bug.cgi?id=8753

           Summary: Too aggressive expansion for variables which have void
                    initializer
           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: k.hara...@gmail.com


--- Comment #0 from Kenji Hara <k.hara...@gmail.com> 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to