Bug 9994 – Built-in generated opAssign should call dtor on assignment
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-26T01:34:00Z
Last change time
2013-06-03T10:07:00Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-04-26T01:34:16Z
Spin-off from issue 9989.
According to the Walter's comment,
http://d.puremagic.com/issues/show_bug.cgi?id=9989#c2
This code:
extern(C) int printf(const char*, ...);
struct S
{
~this(){ printf("dtor\n"); }
}
void main()
{
S s;
s = s;
printf("-- end\n");
}
Should print:
dtor
-- end
dtor
But in current outputs:
-- end
dtor