[Issue 20341] [REG 2.063] 'this' required for explicit instantiation of template member function using template this

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 16 15:04:53 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=20341

--- Comment #1 from Steven Schveighoffer <schveiguy at gmail.com> ---
Just ran into this. I'm surprised this is still an issue.

Happens with classes as well.

```d
class C
{
    void foo(this T)() {}
}

class D : C
{
    void bar() { foo(); }
}
```

The error I get is:

```
onlineapp.d(8): Error: none of the overloads of template `onlineapp.C.foo` are
callable using argument types `!()()`
onlineapp.d(3):        Candidate is: `foo(this T)()`
```

--


More information about the Digitalmars-d-bugs mailing list