[Issue 8984] Dynamic array key for associative array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 17 14:03:04 PST 2012


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



--- Comment #2 from bearophile_hugs at eml.cc 2012-12-17 14:03:02 PST ---
(In reply to comment #1)
> Isn't the complaint that the type of the AA should be int[immutable(int)[]],
> not int[int[]]?

This code gives the same error:

void main() {
    int[immutable(int)[]] aa;
    aa[[1]] = 2;
}


test.d(3): Error: associative arrays can only be assigned values with immutable
keys, not int[]


Not giving an error at the definition point of the associative array is another
bug that I have reported elsewhere (that I think Walter doesn't want to fix).

-- 
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