In the following example I'm trying to compare 2 AA's of which 1 is const.
const string[string] a = ["lang": "D"];
string[string] b = ["lang": "D"];
assert(a == b);
The compiler gives the following error:
Error: incompatible types for ((a) == (b)): 'const(immutable(char)[][string])' and 'string[string]'
When I explicitly cast b to const, it does work.
assert(a == cast(const) b);
Comment #1 by robert.schadek — 2024-12-13T18:02:32Z