www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2674] New: Copy postblit constructor this(this) not called for members

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: andrei 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.


-- 
Feb 18 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2674


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 2.027


-- 
Apr 01 2009