Bug 8045 – Postblit should be called on function call initilalizer that returns ref
Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-05-04T22:17:00Z
Last change time
2012-05-04T23:30:37Z
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2012-05-04T22:17:26Z
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);
}