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

           Summary: Glaring hole in const system
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-06-16 04:36:52 PDT ---
DMD 2.063:

class C{ int[] x=[1,2,3]; }

void main(){
    auto c = new immutable(C)();
    auto d = new C();
    static assert(is(typeof(c.x[0])==immutable));
    assert(c.x[0]==1);
    d.x[0]=2;
    assert(c.x[0]==2);
}

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

Reply via email to