On Sunday, 25 April 2021 at 02:45:38 UTC, Paul Backus wrote:
On Sunday, 25 April 2021 at 02:26:00 UTC, Jack wrote:

doesn't this work when called from member in a derived class?

```d

class A
{
        void doSomething(this T)()
        {
                writefln("name = [%s]", __traits(identifier, T));
        }
}

class K : A
{
        void baa()
        {
                doSomething();
        }
}
```

result in the error:

Error: template `foo.A.doSomething` cannot deduce function from argument types `!()()`,

It works if you call it with `this.doSomething()`: https://run.dlang.io/is/eIygNG

that's better, thanks

Reply via email to