[Issue 7530] Postblit not called structs returned from an array index expr.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 10 19:36:44 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7530
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2012-05-10 19:38:07 PDT ---
Reduced test case:
void main()
{
static struct S
{
int val;
this(int n) { val = n; }
this(this) { val *= 3; }
}
S[] sa = new S[](1);
sa[0].val = 1;
S foo()
{
return sa[0]; // postblit should run
}
auto s = foo();
assert(s.val == 3);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list