[Issue 2674] New: Copy postblit constructor this(this) not called for members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 18 14:53:28 PST 2009


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

           Summary: Copy postblit constructor this(this) not called for
                    members
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: andrei at metalanguage.com


Consider this code:

struct A
{
    this(this)
    {
        writeln("A's copy");
    }
}

struct B
{
    A member;
    this(this)
    {
        writeln("B's copy");
    }
}

void main(string[] args)
{
    B b1;
    B b2 = b1;
}

It only prints "B's copy" which means that the A member of B has not been
properly copied. There are many bugs related to this(this), but this is a
blocker.


-- 



More information about the Digitalmars-d-bugs mailing list