Comment #0 by dlang-bugzilla — 2015-04-23T23:06:02Z
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.
Comment #1 by schveiguy — 2015-04-24T02:24:03Z
Yes. It has something to do with the way it's called.
changing the line to 'this.f()' works (valid workaround).
calling f from outside the class works.
Comment #2 by nick — 2018-03-09T18:53:10Z
*** Issue 17773 has been marked as a duplicate of this issue. ***
Comment #3 by schveiguy — 2023-03-16T15:07:12Z
*** Issue 20341 has been marked as a duplicate of this issue. ***
Comment #4 by schveiguy — 2023-03-16T15:09:37Z
Marking as regression from issue 20341
Comment #5 by robert.schadek — 2024-12-13T18:42:26Z