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
Comment #1 by k.hara.pg — 2013-04-26T01:46:28Z
Comment #2 by github-bugzilla — 2013-04-26T09:33:26Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7a4a9e381a12913155383335aa018e313410b20d fix Issue 9994 - Built-in generated opAssign should call dtor on assignment https://github.com/D-Programming-Language/dmd/commit/0793666f2accace2f4c20c1355daa08618f6dfb9 Merge pull request #1941 from 9rnsr/fix9994 Issue 9994 - Built-in generated opAssign should call dtor on assignment
Comment #3 by github-bugzilla — 2013-06-03T10:07:00Z
Commit pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/823d8a46d73b35f6f5836a636ca4f2169a0be99d fix Issue 9994 - Built-in generated opAssign should call dtor on assignment