Make shadowing mixin template names an error (5 years old problem)
mw
m at g.c
Sun Jun 21 18:59:24 UTC 2026
On Saturday, 9 May 2026 at 12:04:45 UTC, Steven Schveighoffer
wrote:
> On Tuesday, 5 May 2026 at 21:47:09 UTC, mw wrote:
>> Make shadowing mixin template names an error
>>
>> https://github.com/dlang/dmd/issues/23060#issuecomment-4374242813
>
> Dennis is correct. This is how mixin templates are supposed to
> work, and if we changed that it would be massively disruptive.
>
> I would recommend using string mixins for the behavior you want.
Using string mixin worked.
But string mixin and template mixin have different behavior in
this case shows the language need to improve.
We can do deprecation slowly.
And at least for now, the compiler should generate a warning
message.
More information about the Digitalmars-d
mailing list