[Issue 21564] New: Allow assignment syntax for instantiating mixin templates
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 20 18:59:00 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21564
Issue ID: 21564
Summary: Allow assignment syntax for instantiating mixin
templates
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: qs.il.paperinik at gmail.com
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] ;
--
More information about the Digitalmars-d-bugs
mailing list