https://d.puremagic.com/issues/show_bug.cgi?id=12420
--- Comment #1 from Kenji Hara <[email protected]> 2014-03-29 20:21:09 PDT --- (In reply to comment #0) > This code should compile: > --- > void main() > { > int[char[]] aa; > aa[new char[1]] = 5; // line 4 > } > --- > main.d(4): Error: associative arrays can only be assigned values with > immutable > keys, not char[] > --- I agree with the conclusion, the reason in my thought is: `new char[1]` makes unique data and have no foreign reference, so it can be implicitly convertible to immutable(char[]). Therefore directly using it in the index part of the AA element setting will be allowed. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
