[Issue 12420] [AA] Can't set associative array with array as key value using key type

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Mar 10 12:06:12 PDT 2015


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

--- Comment #11 from Denis Shelomovskij <verylonglogin.reg at gmail.com> ---
(In reply to Steven Schveighoffer from comment #10)
> (In reply to Denis Shelomovskij from comment #9)
> 
> > I can't believe anyone can accept bahaviour shown in Comment 6.
> 
> I agree with you, and I have argued as much in the NG. The compiler should
> either enforce immutability, or not care. Enforcing const has all of the
> annoyance, with none of the guarantee.

But htis issue even not about this. AA's key type is `const char[]` and
`char[]` is implicitly convertible to `const char[]` anyway. So this issue is
about error in type checking and error in error message. )

--


More information about the Digitalmars-d-bugs mailing list