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

           Summary: Array ops punch through const system
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dfj1es...@sneakemail.com
            Blocks: 2573


--- Comment #0 from Sobirari Muhomori <dfj1es...@sneakemail.com> 2010-11-28 
09:00:08 PST ---
---
class A { int m=5; }

int main()
{
    A[] a=new A[1];
    immutable(A)[] b=[new immutable(A)];
    assert(b[0].m==5);
    a[]=b[]; //should not pass typecheck
    a[0].m=10;
    assert(b[0].m==5,"fail"); //line 18
    return 0;
}
---
>dmd -w -debug -run test.d
---
core.exception.asserter...@test.d(18): fail

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

Reply via email to