[Issue 17773] this template parameter not working from derived class

2017-08-22 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17773

Martin Nowak  changed:

   What|Removed |Added

   Hardware|x86_64  |All
 OS|Linux   |All
   Severity|enhancement |normal

--


[Issue 17773] this template parameter not working from derived class

2018-03-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17773

Nick Treleaven  changed:

   What|Removed |Added

 CC||n...@geany.org

--- Comment #1 from Nick Treleaven  ---
Reduced with commented edit:

class Base
{
size_t classSize(this This)()
{
pragma(msg, This);
return This.sizeof;
}
}

class Derived : Base
{
void foo()
{
classSize();  // added ()
}
}

Error: template `templatethisparam.Base.classSize` cannot deduce function from
argument types `!()()`, candidates are:
   `templatethisparam.Base.classSize(this This)()`

--


[Issue 17773] this template parameter not working from derived class

2018-03-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17773

Nick Treleaven  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Nick Treleaven  ---
Changing foo to use `this.classSize;` works.

*** This issue has been marked as a duplicate of issue 14484 ***

--