www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2009] New: Compile-time multi-dimentional array not initialized

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: bartosz 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


-- 
Apr 18 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2009









-- 
Apr 28 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2009


gide nwawudu.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE







*** This bug has been marked as a duplicate of 1768 ***


-- 
Apr 28 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2009


bartosz relisoft.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |




-- 
Jun 15 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2009


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
             Status|REOPENED                    |RESOLVED
         Resolution|                            |DUPLICATE





Cannot reproduce under DMD 1.036 or 2.019.

When reporting compiler errors, please actually give the errors, rather than
just stating that it "doesn't compile".

And please don't reopen issues without giving your reason for doing so.

*** This bug has been marked as a duplicate of 1768 ***


-- 
Nov 21 2008