https://issues.dlang.org/show_bug.cgi?id=23733

Paul Backus <snarwin+bugzi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal

--- Comment #2 from Paul Backus <snarwin+bugzi...@gmail.com> ---
The spec you linked to says:

> Alias parameters can also be typed. These parameters will accept symbols of 
> that type

...which is not "tight" at all--it places no restrictions on the type
whatsoever.

The *grammar* says that the type must be a BasicType, but the definition of
BasicType is as follows:

> BasicType:
>     FundamentalType
>     . QualifiedIdentifier
>     QualifiedIdentifier
>     Typeof
>     Typeof . QualifiedIdentifier
>     TypeCtor ( Type )
>     Vector
>     TraitsExpression
>     MixinType

Since this includes QualifiedIdentifier, Typeof, and MixinType, it also does
not place any restriction on the type used. And in any case, the example given
in this issue parses successfully.

It's possible that the type was intended to be restricted in some way, but in
that case, this is a bug in the spec. Either way, it is certainly not an
enhancement request.

--

Reply via email to