[Issue 2009] New: Compile-time multi-dimentional array not initialized

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 18 15:14:47 PDT 2008


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

           Summary: Compile-time multi-dimentional array not initialized
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: bartosz at relisoft.com


The following code works at runtime:
string [][] f ()
{
        string [][] result;
        result ~= ["int i;"];
        return result;
}
but when used in a mixin, it doesn't compile
mixin (f()[0][0]);
One little change, adding the initialization of the array, makes it work again:
        string [][] result = []; // works CT


-- 



More information about the Digitalmars-d-bugs mailing list