www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16047] New: Range violation in setting multi-dimensional AA


          Issue ID: 16047
           Summary: Range violation in setting multi-dimensional AA
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: kroeplin.d googlemail.com

The following code results in a range violation for the second assignment to
`aa`, while the first assignment to `aa` works as expected:

    import std.datetime;

    struct S
       string s;

       this(string s)
           this.s = s;

    SysTime[string][string] aa;

    aa["bar"]["bar"] = SysTime.init;
    aa[S("baz").s]["baz"] = SysTime.init;  // Range violation

Any further reduction of the example eliminates the issue.

May 19 2016