[Issue 24516] qualifiers lost when tupleof is aliased

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 2 17:56:31 UTC 2024


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

basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp at gmx.com

--- Comment #6 from basile-z <b2.temp at gmx.com> ---
(In reply to Nick Treleaven from comment #4)
> > The reason must be that `S` in `S.tupleof` is not a TypeExp it's a DeclExp.
> 
> No, the quoted code is for static array tupleof. 
I see, the compiler code you quoted is not for `S.tupleof`

> I tried adding it for
> classes and structs but dotExp seems to have a phantom expression e which is a VarExp.
I'm not sure if that helps but, as you might already know ?, the D front-end
rewrites the DotExp lhs to what it resolves to e.g either a VarExp, a TypeExp,
a DeclExp, etc. If it's not that then maybe that VarExp is used to extract a
side-effects or to create a lvalue. but I dont see why this would be done on a
type, that would be a bug.

--


More information about the Digitalmars-d-bugs mailing list