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

           Summary: Cannot use struct .init when it contains a static
                    array initialized from a single element.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Marco Leise <[email protected]> 2013-02-21 21:26:11 PST ---
Seeing is believing. Reduced test case:
____________________

import core.stdc.stdlib;

struct SZDDFile
{
    ExpandData* pExpandData = null;

    struct ExpandData
    {
        ubyte[4096] window = 0;
    }

    void open()
    {
        pExpandData = cast(ExpandData*) malloc (ExpandData.sizeof);
        *pExpandData = ExpandData.init;
    }
}
____________________

Error: cannot implicitly convert expression (cast(ubyte)0u) of type ubyte to
ubyte[4096LU]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to