alias syntax
Ellery Newcomer
ellery-newcomer at utulsa.edu
Wed Aug 5 18:09:32 PDT 2009
> ----------------------------------------------------------
> As to your question:
> class K{
> alias static int B;
> B b; // b is non-static
> }
> ----------------------------------------------------------
>
Curious. I didn't actually test the example, but I did for deprecated,
and it doesn't get ignored.
Further investigation shows that scope also isn't ignored, but the rest are.
Also note that const is okay in a typedef, but not in an alias.
And going over into D2 land,
alias const(int) I; //is permitted, and
alias immutable int I; //is permitted, but
alias const int I; // bombs due to that one weird semantic rule
Oh well. I guess I'll just parse it and flag any use of it as an error.
More information about the Digitalmars-d-learn
mailing list