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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 27 20:50:41 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10488


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Kenji Hara <k.hara.pg at 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: -------


More information about the Digitalmars-d-bugs mailing list