www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9079] New: 'delete this' no longer compiles

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9079

           Summary: 'delete this' no longer compiles
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: siegelords_abode yahoo.com



Compiles fine with 2.060 but fails with 2.061 beta.

class B
{
    void test()
    {
        delete this;
    }
}

// test.d(5): Error: Cannot modify 'this'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 25 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9079


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |INVALID



15:32:18 PST ---
See http://d.puremagic.com/issues/show_bug.cgi?id=4596

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 27 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9079




I am unhappy how this change breaks existing code without warning. The
progression suggested by Walter should have been followed:
http://d.puremagic.com/issues/show_bug.cgi?id=780#c3 .

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