[Issue 12787] New: can't nest associative arrays and arrays

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu May 22 11:51:43 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12787

          Issue ID: 12787
           Summary: can't nest associative arrays and arrays
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: vlevenfeld at gmail.com

this code will fail to compile at the declaration of a2, with Error: not an
associative array initializer

int[][char][][] a1 = [
    [
        ['a':[1,2,3],'b':[2,3,4],'c':[3,4,5]],
        ['d':[6,7,8],'e':[7,8,9]]
    ], 
    [
        ['a':[1,2,3],'b':[2,3,4],'c':[3,4,5]],
        ['d':[6,7,8],'e':[7,8,9]]
    ]
];
int[][char][][int] a2 = [
    1000:[
        ['a':[1,2,3],'b':[2,3,4],'c':[3,4,5]],
        ['d':[6,7,8],'e':[7,8,9]]
    ], 
    2000:[
        ['a':[1,2,3],'b':[2,3,4],'c':[3,4,5]],
        ['d':[6,7,8],'e':[7,8,9]]
    ]
];

--


More information about the Digitalmars-d-bugs mailing list