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

           Summary: Assigning structs with postblit to a member of another
                    struct fails at CTFE
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Dmitry Olshansky <[email protected]> 2012-12-22 
12:48:03 PST ---
This sample:

@trusted struct U
{
    this(this)
    {
    }
}

struct InvList
{
private:
    U data;
};

static InvList ivals()
{       
    InvList list;
    //next line fails
    list.data = U.init;
    U a;
    //while this one works
    a = U.init;
    return list;
}

immutable foo = ivals();


Fails to compile with:
Error: CTFE internal error: unsupported assignment this = p
ctfe_this.d(18):        called from here: list.data.opAssign(U())
ctfe_this.d(24):        called from here: ivals()

Notice the first error without a line number.

Tested with lastest dmd from master.

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

Reply via email to