[Issue 8984] New: Dynamic array key for associative array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 8 14:26:14 PST 2012


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

           Summary: Dynamic array key for associative array
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-11-08 14:26:13 PST ---
void main() {
    int[int[]] aa;
    aa[[1]] = 2;
}


Is this error message correct? DMD 2.061alpha:

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

I think the dynamic array literal [1] should be implicitly convertible to
immutable.

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