`Alias this` to a mixed in property
ag0aep6g
anonymous at example.com
Wed Jan 24 14:21:42 UTC 2018
On 01/24/2018 02:24 PM, Bastiaan Veelo wrote:
> `Alias this` to mixed in properties does not seem to work, see below. If
> you think it should, I'll file an issue. Otherwise: can this be made to
> work somehow?
Not supposed to work as it is. The spec says that you cannot make an
overload set just by mixing in multiple functions/methods with the same
name. Instead, you have to do it like this:
----
mixin getter g;
mixin setter!int s;
alias p = g.p;
alias p = s.p;
----
https://dlang.org/spec/template-mixin.html#mixin_scope
More information about the Digitalmars-d-learn
mailing list