January 31, 2007 [Issue 910] New: Error in description of "this" and "super" keywords | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=910 Summary: Error in description of "this" and "super" keywords Product: D Version: unspecified Platform: All URL: http://www.digitalmars.com/d/expression.html OS/Version: All Status: NEW Keywords: spec Severity: normal Priority: P2 Component: www.digitalmars.com AssignedTo: bugzilla@digitalmars.com ReportedBy: davidell@earthling.net In the descriptions of <b>this</b> and <b>super</b>, this page says "Within a non-static member function, <b>this</b> resolves to a reference to the object that called the function." This seems to be a mistake. A function couldn't and shouldn't have information about its caller. Plus, functions are called by functions, not by objects. My suggestion for a description of <b>this</b> is as follows: Within a non-static member function, <b>this</b> resolves to a reference to the object for which the function was called — the current object, whose members are in the current scope. [second sentence unchanged] And <b>super</b> could be described quite consisely: <b>super</b> is identical to <b>this</b>, except that it is cast to <b>this</b>'s base class. [next four sentences unchanged] -- |
February 12, 2007 [Issue 910] Error in description of "this" and "super" keywords | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=910 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla@digitalmars.com 2007-02-12 03:45 ------- Fixed DMD 1.005 -- |
Copyright © 1999-2021 by the D Language Foundation