Why can't I assign a mixin to an alias?

Alex Parrill via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 10 20:36:06 PDT 2016


On Saturday, 11 June 2016 at 02:46:00 UTC, Adam D. Ruppe wrote:
> On Saturday, 11 June 2016 at 02:33:46 UTC, Alex Parrill wrote:
>> Mixins are statements.
>
> No, they're not. Well, yes they are [1], but there are also 
> mixin expressions [2]. Not to be confused with the 
> TemplateMixin[3], which is indeed always a statement.
>
> 1: http://dlang.org/spec/grammar.html#MixinExpression
> 2: http://dlang.org/spec/grammar.html#MixinStatement
> 3: http://dlang.org/spec/grammar.html#TemplateMixin

Huh, every time I've used mixins, I've always run into the issue 
in the OP, so I assumed they were statements. It definitely seems 
like a bug then.


More information about the Digitalmars-d-learn mailing list