[Issue 4279] AAs change key type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 30 06:47:36 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4279



--- Comment #3 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2010-08-30 06:47:23 PDT ---
(In reply to comment #2)
> I think changing the key type to const during iteration is a useless gesture,
> and just serves as an annoyance rather than a guarantee.
> 
> See bug 4410 that I reported later but for a different reason.

In this case it doesn't change the key type during iteration, it changes it in
the declaration:

import std.stdio: writeln;
void main() 
{
    int[char[]] data = [cast(char[])"foo" : 1];
    writeln(typeid(data));
}

Prints: int[const(char)[]]

Unless I got it wrong here. :)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list