www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11725] New: Cannot dup const AA

https://d.puremagic.com/issues/show_bug.cgi?id=11725

           Summary: Cannot dup const AA
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: jlquinn optonline.net



---
void foo() {
  const int[] aa = [1,2];
  int[] bb = aa.dup;        // Works

  const int[string] ia = ["a":1,"b":2];
  int[string] ib = ia.dup;    // Error
}

/home/jlquinn/dmd2/linux/bin64/dmd -c aabug.d 
aabug.d(7): Error: cannot implicitly convert expression (ia.dup()) of type
const(int)[string] to int[string]

Version 2.064.2 on Debian x86_64

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 11 2013