July 12, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6298

           Summary: ref breaks struct immutability
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2011-07-12 11:52:22 PDT ---
With DMD 2.054 this code compiles and runs, but I think this is not good:


struct Foo {
    int x;
}
void bar(ref Foo f) {
    f.x++;
}
void main() {
    immutable Foo f;
    bar(f);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 12, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6298


Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |schveiguy@yahoo.com
         Resolution|                            |DUPLICATE


--- Comment #1 from Steven Schveighoffer <schveiguy@yahoo.com> 2011-07-12 13:05:59 PDT ---
*** This issue has been marked as a duplicate of issue 5493 ***

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