Difference in compiletime vs compiletime or compiler bug?

Sjoerd Nijboer dlang at sjoerdnijboer.com
Fri Dec 27 18:49:32 UTC 2019


On Friday, 27 December 2019 at 18:34:49 UTC, Adam D. Ruppe wrote:
> On Friday, 27 December 2019 at 18:22:10 UTC, Sjoerd Nijboer 
> wrote:
>> When calling the mixin directly instead of through the 
>> template mixin it breaks with thesame error message.
>
> What exactly did you do here?

I meant to say that that is when it does work.
I shoul've caught this when I proof-read this post.

> template mixins take things in two different scopes:
> 
> mix!one_string
> mix!other_string

> creates two separate things that do not overload each other. 
> You have to `alias name = xxx` twice in the same scope to merge 
> them.

> string mixin works differently, it doesn't produce a scope. In 
> your case you probably just want to use string mixin and take 
> the `mix` item out entirely.

Should concatenating the list and mixing that in work too?

I'll probably remove the mixin template completely, concatenate 
the array of strings and mixin the entire array if that should be 
the proper way for solving this.
Thank you!


More information about the Digitalmars-d-learn mailing list