https://issues.dlang.org/show_bug.cgi?id=16758

          Issue ID: 16758
           Summary: Variant.opIndex result not modified after opAssign
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nob...@puremagic.com
          Reporter: n...@geany.org

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.

--

Reply via email to