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

--- Comment #16 from [email protected] ---
Niche or not, this problem ought to be fixed. It's been how long now, and we
still haven't gotten our act together on AA's.

Lookups should be permissive and allow types that are comparable with the key
type (e.g., using a char[] to lookup a T[string] should be fine).

Assignment, however, must be much stricter because of aliasing issues; it
should only allow types implicitly convertible to the key type (it's illegal to
assign a char[] key to T[string], because if the key is subsequently modified
via the mutable reference, the AA breaks.)

--

Reply via email to