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

           Summary: Static arrays can not be assigned from const(T)[N] to
                    T[N]
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: lud...@informatik.uni-luebeck.de


--- Comment #0 from S´┐Żnke Ludwig <lud...@informatik.uni-luebeck.de> 2011-07-11 
01:52:55 PDT ---
The following snipped worked up to DMD 2.053 but fails on 2.054:

---
void test()
{
    const(int)[4] src = [1, 2, 3, 4];
    int[4] dst;
    dst = src; // Error: cannot implicitly convert expression (src) of type
const(int[4u]) to int[]
    dst[] = src[]; // still works
}
---

The assignment "T[N] = const(T)[N]" should work as long as "T = const(T)" works
as there is no aliasing goind on but just a plain copy.

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

Reply via email to