[Issue 10488] Reg (2.063): Template this paramter doesn't work properly

2015-10-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10488

Marc Schütz  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||schue...@gmx.net
 Resolution|INVALID |---
   Severity|regression  |enhancement

--- Comment #3 from Marc Schütz  ---
IMO the fact that `typeof(this)` is allowed in static methods is a compelling
argument to allow this. It has interesting applications when combined with
inheritance, see this forum post:

http://forum.dlang.org/post/n0gl6m$1oms$1...@digitalmars.com

Therefore I'm reopening this issue as an enhancement request.

--


[Issue 10488] Reg (2.063): Template this paramter doesn't work properly

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10488

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|future  |D2

--


[Issue 10488] Reg (2.063): Template this paramter doesn't work properly

2013-06-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10488



--- Comment #2 from Jacob Carlborg d...@me.com 2013-06-28 01:29:36 PDT ---
I thought that the whole point was to use it when this wasn't normally
allowed. Just like typeof(this) can be used outside instance methods.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 10488] Reg (2.063): Template this paramter doesn't work properly

2013-06-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=10488


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


--- Comment #1 from Kenji Hara k.hara...@gmail.com 2013-06-27 20:50:38 PDT ---
That was accepts-invalid bug.
Even with 2.062, it didn't work properly.

class Foo
{
static void instance (this T) () {}
}
void main ()
{
import std.typetuple;
foreach (T; TypeTuple!(Foo, const Foo, immutable Foo))
{
pragma(msg, T);
T.instance();  // fail to compile with const and immutable
}
}

static member function does not have valid 'this' expression, so compiler
cannot deduce TemplateThisParameter with IFTI.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---