www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8201] New: Conversion from dynamic array to static array fails when static array is immutable

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8201

           Summary: Conversion from dynamic array to static array fails
                    when static array is immutable
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: jmdavisProg gmx.com



PDT ---
void main()
{
    ubyte[] buffer = [0, 1, 2, 3, 4, 5];
    ubyte[4] arr = buffer[0 .. 4]; //Compiles
    const ubyte[4] cArr = buffer[0 .. 4]; //Compiles
    immutable ubyte[4] iArr = buffer[0 .. 4]; //Fails to compile
}

I see no reason that the line with the immutable static array should fail to
compile when the mutable and const ones succeed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 05 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8201


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsimcha yahoo.com



*** Issue 4454 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8201


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
            Version|unspecified                 |D2



Reduced test case:

void main()
{
    uint[2] msa;
    immutable uint[2] isa = msa;
}

This is a problem only in variable initializing.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8201


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/1109

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 09 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8201




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/da8e2a038105ad0149a8f66fbcfe31079ce3a534
fix Issue 8201 - Conversion from dynamic array to static array fails when
static array is immutable

https://github.com/D-Programming-Language/dmd/commit/ff32f4256e2863f63628f54f43187a8c83c4f8de


Issue 8201 - Conversion from dynamic array to static array fails when static
array is immutable

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 14 2012