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:
http://d.puremagic.com/issues/show_bug.cgi?id=518

           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:
http://d.puremagic.com/issues/show_bug.cgi?id=518


deewiant gmail.com changed:

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





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