Bug 16758 – Variant.opIndex result not modified after opAssign

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2016-11-24T15:38:00Z
Last change time
2017-07-23T11:30:22Z
Assigned to
nobody
Creator
nick

Comments

Comment #0 by nick — 2016-11-24T15:38:50Z
import std.variant; Variant a = new int[1]; a[0] += 5; assert(a[0] == 5); // fails This is documented, but can be fixed by implementing opIndexOpAssign. PR pending.
Comment #1 by github-bugzilla — 2016-12-06T13:46:49Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/cdd2acb0d58b38659260348d4fb78d2aba6db51c Fix Issue 16758 - Variant.opIndex result not modified after opAssign Add VariantN.opIndexOpAssign. Also undocument & tweak test for const(Variant).opIndex. https://github.com/dlang/phobos/commit/94d3786d6995dbc2fafdba1408dd6d7974d91625 Merge pull request #4923 from ntrel/variant-opIndexOpAssign Fix Issue 16758 - Variant.opIndex result not modified after opAssign
Comment #2 by github-bugzilla — 2016-12-27T13:11:36Z
Commits pushed to scope at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/cdd2acb0d58b38659260348d4fb78d2aba6db51c Fix Issue 16758 - Variant.opIndex result not modified after opAssign https://github.com/dlang/phobos/commit/94d3786d6995dbc2fafdba1408dd6d7974d91625 Merge pull request #4923 from ntrel/variant-opIndexOpAssign
Comment #3 by github-bugzilla — 2017-01-07T03:02:44Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/cdd2acb0d58b38659260348d4fb78d2aba6db51c Fix Issue 16758 - Variant.opIndex result not modified after opAssign https://github.com/dlang/phobos/commit/94d3786d6995dbc2fafdba1408dd6d7974d91625 Merge pull request #4923 from ntrel/variant-opIndexOpAssign
Comment #4 by github-bugzilla — 2017-01-16T23:25:14Z
Commits pushed to newCTFE at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/cdd2acb0d58b38659260348d4fb78d2aba6db51c Fix Issue 16758 - Variant.opIndex result not modified after opAssign https://github.com/dlang/phobos/commit/94d3786d6995dbc2fafdba1408dd6d7974d91625 Merge pull request #4923 from ntrel/variant-opIndexOpAssign
Comment #5 by greeenify — 2017-07-23T11:25:23Z
@Erdem: Why did you reopen this? It works fine for me. See for yourself: https://is.gd/ZwMquz If you have run into a similar issue, please open a new issue. Thanks!
Comment #6 by farukerdemoncel — 2017-07-23T11:30:22Z
@greenify: Sorry this was a mistake. I accidentally reopened this.