Bug 14484 – [REG 2.063] IFTI doesn't work with TemplateThisParameter and inheritance

Status
NEW
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-23T23:06:02Z
Last change time
2024-12-13T18:42:26Z
Keywords
diagnostic, rejects-valid
Assigned to
No Owner
Creator
Vladimir Panteleev
See also
https://issues.dlang.org/show_bug.cgi?id=20341
Moved to GitHub: dmd#18981 →

Comments

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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18981 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB