alias c=mixin(expr); disallowed, why?

Timon Gehr timon.gehr at gmx.ch
Sat Jun 22 14:47:58 PDT 2013


On 06/22/2013 09:52 PM, Timothee Cour wrote:
> Is there a reason the language spec disallows this?
>
> ----
> void main(){
>     auto a=mixin("1");//OK
>     alias b=a;//OK
>     mixin("alias c=a;");//OK
>     // alias c=mixin("a");//NG : Error: basic type expected, not mixin
> }
> ----

No, it is arbitrary.


More information about the Digitalmars-d-learn mailing list