Bug 2674 – Copy postblit constructor this(this) not called for members
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2009-02-18T16:53:00Z
Last change time
2015-06-09T05:15:04Z
Assigned to
bugzilla
Creator
andrei
Comments
Comment #0 by andrei — 2009-02-18T16:53:29Z
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.