Bug 16142 – Adding a dtor / postblit (even disabled) forces opAssign

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-06-09T00:22:00Z
Last change time
2016-10-01T11:48:10Z
Assigned to
nobody
Creator
mathias.lang

Comments

Comment #0 by mathias.lang — 2016-06-09T00:22:53Z
``` struct A { @disable this(this); @disable void opAssign(const A); } struct B { A a; } void main() { B b; b = B(); } ``` This compiles and run without problem, even though `A` has its `opAssign` disabled.
Comment #1 by mathias.lang — 2016-06-09T01:22:02Z
Comment #2 by github-bugzilla — 2016-06-18T08:01:06Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/348bd95e0663f8748957b0f44e24b55c24811c58 Issue 16142: Correct test for hasElaborateAssign Nested member's `@disable opAssign` should propagate to parents. https://github.com/dlang/phobos/commit/a26026478cd337b89396e70c9e9186ebde172c51 Merge pull request #4421 from mathias-lang-sociomantic/dmd-pr-5854 Issue 16142: Correct test for hasElaborateAssign
Comment #3 by github-bugzilla — 2016-07-01T23:43:35Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/517f14a949a2998e51517cbef444f2b3208a3789 Fix issue 16142: Disabled opEquals is overriden when a dtor/postblit is present In order to pick up disabled opEquals, we need to process the members of the struct anyway even if there is a dtor / postblit. https://github.com/dlang/dmd/commit/113cf3f4f8b4a786d7d7dca6bfc62ed024d12af9 Merge pull request #5854 from mathias-lang-sociomantic/opassign-2 Fix issue 16142: Disabled opAssign is overriden when a dtor/postblit is present
Comment #4 by github-bugzilla — 2016-07-03T16:27:58Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/dbb412d49ce76e1bf939ee5dd8fb10093e27bdbe Issue 16142 - Enable test for disabled recursive identity opAssign https://github.com/dlang/phobos/commit/fbccadbc5e2fd8628423be24d961ff0db90c01e7 Merge pull request #4543 from Geod24/correct-opassign Issue 16142 - Enable test for disabled recursive identity opAssign
Comment #5 by github-bugzilla — 2016-10-01T11:45:32Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/348bd95e0663f8748957b0f44e24b55c24811c58 Issue 16142: Correct test for hasElaborateAssign https://github.com/dlang/phobos/commit/a26026478cd337b89396e70c9e9186ebde172c51 Merge pull request #4421 from mathias-lang-sociomantic/dmd-pr-5854 https://github.com/dlang/phobos/commit/dbb412d49ce76e1bf939ee5dd8fb10093e27bdbe Issue 16142 - Enable test for disabled recursive identity opAssign https://github.com/dlang/phobos/commit/fbccadbc5e2fd8628423be24d961ff0db90c01e7 Merge pull request #4543 from Geod24/correct-opassign
Comment #6 by github-bugzilla — 2016-10-01T11:48:10Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/517f14a949a2998e51517cbef444f2b3208a3789 Fix issue 16142: Disabled opEquals is overriden when a dtor/postblit is present https://github.com/dlang/dmd/commit/113cf3f4f8b4a786d7d7dca6bfc62ed024d12af9 Merge pull request #5854 from mathias-lang-sociomantic/opassign-2