[Issue 6570] 'this' silently passes from one object to another
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 2 18:57:37 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6570
--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2012-12-02 18:57:36 PST ---
(In reply to comment #1)
> I don't know why 'T2' was in output, it should be 'T' (and it is now).
>
> As for why it works: this is used to pick a specific override in some base
> class, e.g.:
>
> class A
> {
> void test() { }
> }
>
> class B : A
> {
> override void test() { }
> }
>
> class C : B
> {
> override void test() { A.test(); }
> }
>
> If you use 'super.test()' you would end up calling B.test instead of A.test.
That is bug 8809 and was fixed in 2.061head.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list