fix issue 19708 - Can't use __traits(getAttributes, ...)[...] as a type#10144
Conversation
|
Thanks for your pull request and interest in making D better, @Basile-z! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "stable + dmd#10144" |
|
Don't auto-merge for now because I may try something with |
|
Yeah it really looks like using the scope flags fixes a flaw in the original design. There nothing really special anymore in |
|
@Basile-z Thank you for picking this up. Once this fix is released the workaround should be removed from the spec |
|
So, it this good to go? |
Yes I see that point 4 still uses a Tuple.
Yes. |
The first part of the fix is simply to extract
Types fromTypeExprswhen aTypeTraitreturning aTypeTuplecontained some .The second part is more delicate.
A flag used by theIt's fixed by refactoring a bit the feature using a new SCOPE member.TypeTraits was not set correctly because theTypeTraitwas not directly aliased but wrapper in aTypeNext. To fix te problem the type next is replaced by its content after aliasing it.