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

           Summary: Copy constructor is called instead of assignment on
                    member
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Denis Shelomovskij <[email protected]> 2013-10-09 
11:13:52 MSD ---
---
struct S
{
    this(this) {}
    @disable void opAssign(S);
}

struct T
{ S s; }

void main()
{
    S s1, s2;
    static assert(!__traits(compiles, s1 = s2));
    T t1, t2;
    static assert(!__traits(compiles, t1.tupleof = t2.tupleof));
    static assert(!__traits(compiles, t1 = t2)); // assert fails
}
---

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

Reply via email to