D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1893 - Allow delete to work on non-lvalues
Summary: Allow delete to work on non-lvalues
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 enhancement
Assignee: No Owner
URL:
Keywords: spec
Depends on:
Blocks:
 
Reported: 2008-03-05 06:50 UTC by Bruno Medeiros
Modified: 2015-06-09 01:14 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Bruno Medeiros 2008-03-05 06:50:59 UTC
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 Andrej Mitrovic 2012-12-23 11:01:35 UTC
I think it's far too late for this enhancement, delete will likely not be improved since it's scheduled for deprecation.