[Bug 51] New: gdc does not postblit all array elements.
gdc-bugzilla at gdcproject.org
gdc-bugzilla at gdcproject.org
Fri May 17 16:10:04 PDT 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=51
Bug #: 51
Summary: gdc does not postblit all array elements.
Classification: Unclassified
Product: GDC
Version: development
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gdc
AssignedTo: ibuclaw at gdcproject.org
ReportedBy: ibuclaw at gdcproject.org
Testcase:
---
struct S
{
int x;
int pad;
this(this)
{
++x;
}
}
void main()
{
S s;
auto sarr = new S[1];
auto sarr2 = sarr;
// postblit all fields.
sarr2 ~= s;
assert (sarr2[0].x == 1);
assert (sarr2[1].x == 1);
assert (sarr[0].x == 0);
assert (s.x == 0);
}
--
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the D.gnu
mailing list