www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14148] New: .dup of associative array is not mutable


          Issue ID: 14148
           Summary: .dup of associative array is not mutable
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: pro.mathias.lang gmail.com

The following code:
string[string] cpAA(in string[string] ctx) { return ctx.dup; }

Gives this error:
bug.d(1): Error: cannot implicitly convert expression (dup(ctx)) of type
const(string)[string] to string[string]

Tested with 2.066 & master (b9c8ded)

Feb 08 2015