www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13622] New: [AA] unable to compare const associative array

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

          Issue ID: 13622
           Summary: [AA] unable to compare const associative array with
                    mutable
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: wazar.leollone yahoo.com

void main() 
{
    int[int] aa1 = [1:2];
    const int[int] aa2 = aa1;
    assert(aa1 == aa2);
}

This code causes a error: 
Error: incompatible types for ((aa1) == (aa2)): 'int[int]' and
'const(int[int])'

--
Oct 16 2014