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

--- Comment #3 from RazvanN <razvan.nitu1...@gmail.com> ---
(In reply to Paul Backus from comment #2)
> 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.

When I said "tight", I meant "brief, not too explanatory".

> 
> 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.

What I meant is that the way I read the spec, it seems that template alias
parameters would work only for concrete types. I don't know if this was
intentional or not, but if the design is extended to work for abstract types as
well, then that is an enhancement request. If the person that implemented this
did intend to exclude abstract types, then indeed it is a "normal" spec bug.

--

Reply via email to