[Issue 8201] New: Conversion from dynamic array to static array fails when static array is immutable
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 5 23:36:34 PDT 2012
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 at puremagic.com
ReportedBy: jmdavisProg at gmx.com
--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-06-05 23:38:34 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: -------
More information about the Digitalmars-d-bugs
mailing list