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





------- Comment #1 from clugdbug yahoo.com.au  2008-04-28 07:25 -------
I think this is the same as issue#1768.


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




------- Comment #2 from gide nwawudu.com  2008-04-28 10:02 -------


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




------- Comment #3 from smjg iname.com  2008-11-21 15:24 -------
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