[Issue 20884] Using getMember with a type as first argument can lose type qualifiers.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 27 00:13:53 UTC 2022


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

--- Comment #4 from Boris Carvajal <boris2.9 at gmail.com> ---
That is an alias bug, replace the getMember trait with 'mixin("T." ~ name)' in
your code and the result is the same.
```
alias Ref = mixin("T." ~ name);
...
alias Type2 = typeof(mixin("T." ~ name));
```

I think it's duplicated of issue 2704 (really old, probably there are more
reports out there).
Some different but related bugs are issue 13343 and issue 20863.

There is a generic alias problem with respect to aggregate types (that have
qualifiers) because the duality of them being a symbol and type at the same
time, it also extends when interacting with their members.

This report was about fixing '__traits(getMember)' so maybe you should move the
test case to 2704 and keep this closed.

--


More information about the Digitalmars-d-bugs mailing list