www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11477] New: [AA] `T*` as associative array key becomes `const(T)*`

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

           Summary: [AA] `T*` as associative array key becomes `const(T)*`
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



09:55:06 MSK ---
---
void main()
{
    int[int*] aa;
    int* k0 = aa.keys[0]; // Error: cannot implicitly convert ... of type
const(int)* to int*
    foreach(int* k, int v; aa) // Error: foreach: index must be type
const(int)*, not int*
    { }
}
---

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