Bug 21564 – Allow assignment syntax for instantiating mixin templates

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-01-20T18:59:00Z
Last change time
2024-08-28T07:03:01Z
Keywords
pull
Assigned to
No Owner
Creator
Bolpat

Comments

Comment #0 by qs.il.paperinik — 2021-01-20T18:59:00Z
Currently, a mixin template instance can be aliased akin to the old alias syntax: mixin M!params m; // m is an alias to M!params It would be desirable to also allow the assignment syntax: mixin m = M!params; Grammar changes: TemplateMixin: mixin MixinTemplateName TemplateArguments[opt] Identifier[opt] ; + mixin Identifier = MixinTemplateName TemplateArguments[opt] ;
Comment #1 by dlang-bot — 2024-04-16T17:31:09Z
@ntrel created dlang/dmd pull request #16387 "Fix Bugzilla 21564 - assignment syntax for instantiating mixin templates" fixing this issue: - Fix Bugzilla 21564 - Allow assignment syntax for instantiating mixin templates Following the [alias this change](https://dlang.org/changelog/2.105.0.html#dmd.alias-this-syntax), I think mixin instantiation was the last place not using assignment syntax. https://github.com/dlang/dmd/pull/16387
Comment #2 by dlang-bot — 2024-08-28T07:03:01Z
dlang/dmd pull request #16387 "Fix Bugzilla 21564 - assignment syntax for instantiating mixin templates" was merged into master: - a981cca33130242e4d1feb623984aa3d5f17a297 by Nick Treleaven: Fix Bugzilla 21564 - Allow assignment syntax for instantiating mixin templates Following the [alias this change](https://dlang.org/changelog/2.105.0.html#dmd.alias-this-syntax), I think mixin instantiation was the last place not using assignment syntax. https://github.com/dlang/dmd/pull/16387