-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 22871 - Support aliases to __traits(parameters) #13804
Conversation
|
Thanks for your pull request and interest in making D better, @MoonlightSentinel! 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 run digger -- build "stable + dmd#13804" |
d68b93e to
2f51332
Compare
|
@MoonlightSentinel ping me when this is ready for review |
|
@maxhaton the ifx in the second commit is ready for review. Currently marked as a draft because it includes #22868 |
2f51332 to
a7e2d14
Compare
The current implementation had two bugs preventing users from using the tuple returned by `__traits(parameters)` bound to an alias: - the parser rejected `typeof(__traits(X))`, i.e. a traits without parameters. Fixed by removing the check for existing arguments. - type semantic rejected the alias as invalid and eagerly issued an error. Fixed by extending the list of viable traits.
The current implementation had two bugs preventing users from using the tuple returned by `__traits(parameters)` bound to an alias: - the parser rejected `typeof(__traits(X))`, i.e. a traits without parameters. Fixed by removing the check for existing arguments. - type semantic rejected the alias as invalid and eagerly issued an error. Fixed by extending the list of viable traits.
The current implementation had two bugs preventing users from using
the tuple returned by
__traits(parameters)bound to an alias:typeof(__traits(X)), i.e. a traits withoutparameters. Fixed by removing the check for existing arguments.
error. Fixed by extending the list of viable traits.