[Issue 1899] New: AA of fixed-length arrays fails to initialize

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Mar 8 14:45:44 PST 2008


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

           Summary: AA of fixed-length arrays fails to initialize
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: ddparnell at bigpond.com


The following code fails with an ArrayBoundsError on the assignment.

void main() 
{
    int[3][string] AA;
    AA["abc"] = [5,4,3];
}

But this code does not fail ...

void main() 
{
    struct S { int[3] v; }
    S[string] AA;
    AA["abc"] = S([5,4,3]);
}


-- 



More information about the Digitalmars-d-bugs mailing list