typeof(this) return wrong type

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Apr 22 14:18:14 PDT 2017


On 04/22/2017 04:33 AM, Andrey wrote:
> Hello, I trying to add custom attribute OnClickListener, the problem is
> that typeof always return BaseView type instead of MyView.


There is also typeid() and .classinfo, which may be helpful:

         writeln(this.classinfo.name);

Ali



More information about the Digitalmars-d-learn mailing list