When the template this parameter feature was added to the language it was possible to use it for static methods:

class Foo
{
    static void foo(this T)()
    {
        pragma(msg, T.stringof);
    }
}

class Bar : Foo {}

Foo.foo(); // prints "Foo"
Bar.foo(); // prints "Bar"

For some reason this feature was removed, it might be that it was never indented to work for static methods.

Can we make it work again for static methods? It would be really handy for creating Objective-C bindings.

--
/Jacob Carlborg

Reply via email to