Bug 1893 – Allow delete to work on non-lvalues

Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-03-05T06:50:00Z
Last change time
2015-06-09T01:14:35Z
Keywords
spec
Assigned to
nobody
Creator
bruno.do.medeiros+deebugz

Comments

Comment #0 by bruno.do.medeiros+deebugz — 2008-03-05T06:50:59Z
The following simplified use case fails: delete new Object(); because delete only works on lvalues (in order to set them to null). However, delete'ing non-lvalues is a perfectly valid use case, and should be allowed as well.
Comment #1 by andrej.mitrovich — 2012-12-23T11:01:35Z
I think it's far too late for this enhancement, delete will likely not be improved since it's scheduled for deprecation.