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

           Summary: Built-in dup result should behave as like unique
                    array, if it is possible.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Kenji Hara <[email protected]> 2013-03-06 01:17:32 PST ---
In below, narr = [1,2,3].dup should work.

class C {}
struct S {
    immutable int[] narr;
    immutable C[] carr;
    this(int n) {
        narr = new int[](3); // OK, expected
        narr = [1,2,3].dup;  // NG, rejects-valid
        carr = [new C].dup;  // NG, expected
    }
}

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

Reply via email to