www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16974] New: Equal associative arrays with associative array

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

          Issue ID: 16974
           Summary: Equal associative arrays with associative array keys
                    are considered unequal
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: wrong-code
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: verylonglogin.reg gmail.com

This code should run fine:
---
void main()
{
    int[int] a = [1 : 2];
    assert([a : 3] == [a : 3]);        // fails
    assert([a : 3] == [[1 : 2] : 3]);  // fails
}
---

--
Dec 15 2016