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

Walter Bright <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #13 from Walter Bright <[email protected]> ---
The error message is correct. It's really not safe to have AA keys that are
mutable.

Yes, the compiler currently accepts const keys, and const keys are mutable by
other references. But that is the bug, not the error message about
immutability.

Kenji is also correct that a Unique reference, even if it is mutable, should
also be accepted. This can be implemented in the compiler by testing to see if
a mutable reference can be implicitly converted to mutable.

--

Reply via email to