← Back to index
|
Original Bugzilla link
Bug 9079 – 'delete this' no longer compiles
Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-11-25T10:39:00Z
Last change time
2012-11-27T16:27:03Z
Assigned to
nobody
Creator
siegelords_abode
Comments
Comment #0
by siegelords_abode — 2012-11-25T10:39:40Z
Compiles fine with 2.060 but fails with 2.061 beta. class B { void test() { delete this; } } // test.d(5): Error: Cannot modify 'this'
Comment #1
by andrej.mitrovich — 2012-11-27T15:32:18Z
See
http://d.puremagic.com/issues/show_bug.cgi?id=4596
Comment #2
by siegelords_abode — 2012-11-27T16:27:03Z
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
.