Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 21, 2007 [Issue 867] New: Error messages refer to _dtor instead of ~this | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=867 Summary: Error messages refer to _dtor instead of ~this Product: D Version: 1.00 Platform: PC OS/Version: Windows Status: NEW Keywords: diagnostic Severity: minor Priority: P3 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: deewiant@gmail.com class Foo { abstract ~this(); } The above generates "function asdf.Foo._dtor non-virtual functions cannot be abstract". That should read "asdf.Foo.~this". class Foo { auto ~this(); } The above is similar: "function asdf.Foo._dtor functions cannot be const or auto". With const the behaviour is, of course, the same. However, a leftover from before "scope" is the following: class Foo { scope ~this(); } This emits "function asdf.Foo._dtor functions cannot be const or auto" as well. This should say something about scope. -- |
April 01, 2009 [Issue 867] Error messages refer to _dtor instead of ~this | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=867 clugdbug@yahoo.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch ------- Comment #1 from clugdbug@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[], -- |
April 01, 2009 [Issue 867] Error messages refer to _dtor instead of ~this | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=867 ------- Comment #2 from clugdbug@yahoo.com.au 2009-04-01 09:49 ------- Created an attachment (id=309) --> (http://d.puremagic.com/issues/attachment.cgi?id=309&action=view) D2 patch for 867 -- |
October 14, 2009 [Issue 867] Error messages refer to _dtor instead of ~this | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=867 Walter Bright <bugzilla@digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Walter Bright <bugzilla@digitalmars.com> 2009-10-13 22:52:14 PDT --- This seems to have been fixed for a while now... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation