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

--- Comment #3 from basile-z <b2.t...@gmx.com> ---
(In reply to Nick Treleaven from comment #1)
> > S.tupleof
> 
> I don't think it makes sense to allow `tupleof` to be a type property. It
> should be instance only. The spec does not mention its use on a type.
> https://dlang.org/spec/class.html#tupleof
> 
> Also in dmd/typesem.d, dotExp:
> ```d
>         else if (ident == Id._tupleof)
>         {
>             if (e.isTypeExp())
>             {
>                 error(e.loc, "`.tupleof` cannot be used on type `%s`",
> mt.toChars);
>                 return ErrorExp.get();
>             }
> ```
> For some reason that is not being triggered.

The reason must be that `S` in `S.tupleof` is not a TypeExp it's a DeclExp.

--

Reply via email to