http://d.puremagic.com/issues/show_bug.cgi?id=8980
Summary: no implicit cast to const for AA
Product: D
Version: D2
Platform: x86_64
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Mike van Dongen <[email protected]> 2012-11-08
07:21:12 PST ---
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);
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------