static assert([1:2, 3:4] == [3:4, 1:2]); testx.d(2): Error: cannot compare [1:2, 3:4] at compile time testx.d(2): while evaluating: static assert([1:2, 3:4] == [3:4, 1:2])
https://github.com/D-Programming-Language/dmd/pull/2869
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/33c4e8d59d62e7abd09c808672104de9b242327f Fix Issue 11587 - Cannot compare AAs at compile time https://github.com/D-Programming-Language/dmd/commit/5c38c59876b4adfbe26d2ec421a8376d1bba6f0b Merge pull request #2869 from yebblies/issue11587 Issue 11587 - Cannot compare AAs at compile time
Is this error related to this (supposedly fixed) bug? static assert([1: 1] != [1: 2, 2: 1]); // OK static assert([1: 1] != [1: 2]); // OK static assert([1: 1] != [2: 1]); // Error! DMD 2.067-rc1
(In reply to Nicolas Sicard from comment #3) > Is this error related to this (supposedly fixed) bug? > > static assert([1: 1] != [1: 2, 2: 1]); // OK > static assert([1: 1] != [1: 2]); // OK > static assert([1: 1] != [2: 1]); // Error! > > DMD 2.067-rc1 It's a bug in the pull 2869 implementation. New issue for that: https://issues.dlang.org/show_bug.cgi?id=14325