Bug 910 – Error in description of "this" and "super" keywords

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2007-01-31T03:08:00Z
Last change time
2015-06-09T05:15:04Z
Keywords
spec
Assigned to
bugzilla
Creator
davidell

Comments

Comment #0 by davidell — 2007-01-31T03:08:54Z
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]
Comment #1 by bugzilla — 2007-02-12T03:45:18Z
Fixed DMD 1.005