http://d.puremagic.com/issues/show_bug.cgi?id=867
clugd...@yahoo.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch ------- Comment #1 from clugd...@yahoo.com.au 2009-04-01 09:47 ------- The 'scope' error has already been fixed for D2, but not for D1. This simple patch changes __dtor into ~this, by analogy to how it's done for constructors. Index: declaration.h =================================================================== --- declaration.h (revision 21) +++ declaration.h (working copy) @@ -661,6 +661,8 @@ Dsymbol *syntaxCopy(Dsymbol *); void semantic(Scope *sc); void toCBuffer(OutBuffer *buf, HdrGenState *hgs); + const char *kind(); + char *toChars(); int isVirtual(); int addPreInvariant(); int addPostInvariant(); Index: func.c =================================================================== --- func.c (revision 21) +++ func.c (working copy) @@ -2592,6 +2592,16 @@ return FALSE; } +const char *DtorDeclaration::kind() +{ + return "destructor"; +} + +char *DtorDeclaration::toChars() +{ + return (char *)"~this"; +} + int DtorDeclaration::isVirtual() { /* This should be FALSE so that dtor's don't get put into the vtbl[], --