www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 518] New: Destructors cannot be const or auto - or scope

reply d-bugmail puremagic.com writes:

           Summary: Destructors cannot be const or auto - or scope
           Product: D
           Version: 0.174
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: trivial
          Priority: P5
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com

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.

Nov 15 2006
parent d-bugmail puremagic.com writes:

deewiant gmail.com changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

------- Comment #1 from deewiant gmail.com  2007-03-23 12:18 -------
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 ***

Mar 23 2007