Bug 518 – Destructors cannot be const or auto - or scope

Status
RESOLVED
Resolution
DUPLICATE
Severity
trivial
Priority
P5
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-11-15T07:28:00Z
Last change time
2014-02-15T13:22:00Z
Keywords
diagnostic
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2006-11-15T07:28:49Z
class Foo { scope ~this() { } } The above doesn't compile due to the error "function asdf.Foo._dtor functions cannot be const or auto". This is a deprecated reference to the old meaning of "auto" and should be removed. Having just "auto" should probably generate an error like "destructors don't have a type" or fail similarly to how "int ~this() {}" does.
Comment #1 by matti.niemenmaa+dbugzilla — 2007-03-23T12:18:39Z
Moving this issue to Issue 1078, since the patches for all the current cases of this are there. *** This bug has been marked as a duplicate of 1078 ***