alias declaration spec

Jonathan M Davis jmdavisProg at gmx.com
Tue Feb 25 15:09:08 PST 2014


On Tuesday, February 25, 2014 22:32:44 cal wrote:
> Grammar spec (http://dlang.org/grammar.html#AliasDeclaration)
> allows:
> 
> AliasDeclaration:
>      alias BasicType Declarator
> 
> DMD allows:
> 
> alias ref int MyRefInt;
> 
> Is the ref storage class allowed by the current grammar spec?

No. ref is not part of the BasicType grammar rule. ref is only legal on 
function parameters, return types, and the variable in a foreach loop and is 
not part of the type.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list