Re: Mixin template overloads not working

2021-12-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/7/21 1:03 PM, Q. Schroll wrote: On Tuesday, 7 December 2021 at 12:43:40 UTC, Rumbu wrote: Bug or feature? Feature. It even has a name: "overload set". It keeps you from accidentally calling a function you had no idea existed, for example because of a name clash. Not in this case. See

Re: Mixin template overloads not working

2021-12-07 Thread Q. Schroll via Digitalmars-d-learn
On Tuesday, 7 December 2021 at 12:43:40 UTC, Rumbu wrote: Bug or feature? Feature. It even has a name: "overload set". It keeps you from accidentally calling a function you had no idea existed, for example because of a name clash. Is there any workaround? Yes, the error message is very c

Re: Mixin template overloads not working

2021-12-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/7/21 7:43 AM, Rumbu wrote: On Friday, 3 December 2021 at 10:57:34 UTC, Stanislav Blinov wrote: On Friday, 3 December 2021 at 10:42:37 UTC, Rumbu wrote: Bug or feature? Is there any workaround? The error message explains what to do :) Error: class `mixinover.AnotherVisitor` use of `mi

Re: Mixin template overloads not working

2021-12-07 Thread Rumbu via Digitalmars-d-learn
On Friday, 3 December 2021 at 10:57:34 UTC, Stanislav Blinov wrote: On Friday, 3 December 2021 at 10:42:37 UTC, Rumbu wrote: Bug or feature? Is there any workaround? The error message explains what to do :) Error: class `mixinover.AnotherVisitor` use of `mixinover.Visitor.visit(S s)` is hid

Re: Mixin template overloads not working

2021-12-03 Thread Stanislav Blinov via Digitalmars-d-learn
On Friday, 3 December 2021 at 10:42:37 UTC, Rumbu wrote: Bug or feature? Is there any workaround? The error message explains what to do :) Error: class `mixinover.AnotherVisitor` use of `mixinover.Visitor.visit(S s)` is hidden by `AnotherVisitor`; use `alias visit = Visitor.visit;` to intro

Mixin template overloads not working

2021-12-03 Thread Rumbu via Digitalmars-d-learn
```d class S {} class A:S {} class B:S {} mixin template vmix(T) {    void visit(T t) {} } class Visitor {    void visit(S s) {}    mixin vmix!A;    mixin vmix!B; } class AnotherVisitor: Visitor {    override void visit(A a) {} } ``` This will result in error when I try to override mixin