www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19112] New: Associative array opIn with static array key

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

          Issue ID: 19112
           Summary: Associative array opIn with static array key fails
                    with dynamic array
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: peter.alexander.au gmail.com

void main() {
        int[int[1]] aa;
        aa[[2]] = 1;
        assert([2] in aa);
}

---

This fails.

Expected: either pass or fail to compile.

Last reproduced in 2081.1.

--
Jul 23 2018