[Issue 16178] New: Can't alias a mixin
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Thu Jun 16 17:09:46 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=16178
          Issue ID: 16178
           Summary: Can't alias a mixin
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: hbaelx at hotmail.com
A brief sample:
alias foo = mixin(bar!T);
where var!T returns the name of a valid variable, and thus mixin' it provides
access to said variable.
The previous code won't compile:
Error: basic type expected, not mixin
There is a known workaround around this issue:
alias hack(alias a) = a;
alias foo = hack!(mixin(bar!T));
But clearly it shouldn't have to be done like this.
--
    
    
More information about the Digitalmars-d-bugs
mailing list