[Issue 8045] New: Postblit should be called on function call initilalizer that returns ref
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 4 22:16:13 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8045
Summary: Postblit should be called on function call
initilalizer that returns ref
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-05-04 22:17:26 PDT ---
void main()
{
struct S
{
int a;
this(this)
{
++a;
}
}
ref S f(ref S s)
{
return s;
}
S s1 = S(10);
S s2 = f(s1); // postblit should be called, but doesn't
assert(s2.a == 11);
}
--
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