Maybe I don't understand what TemplateThisParameter is for, but I'd think this should work:
/////////// test.d //////////
class A
{
final void f(this This)()
{
pragma(msg, This);
}
}
class B : A
{
final void x()
{
f();
}
}
/////////////////////////////
I would expect f to be instantiated with This==B.
Vladimir Panteleev (@CyberShadow) reported this on 2015-04-23T23:06:02Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=14484
CC List
Description
Maybe I don't understand what TemplateThisParameter is for, but I'd think this should work: /////////// test.d ////////// class A { final void f(this This)() { pragma(msg, This); } } class B : A { final void x() { f(); } } ///////////////////////////// I would expect f to be instantiated with This==B.