Add phobos.sys.traits.hasIndirections. #10634
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It does the same thing as the std.traits version. They both alias the one in druntime. However, the documentation and tests have been beefed up a bit.
I also added assertWithQualifiers as a private test helper, which it may make sense to add later as a public test helper somewhere, but we don't currently have any module or package for that sort of thing, so for now, it's private. Some of the existing tests should probably also be refactored to use it, but I'm not worrying about that as part of these changes.
I was going to do some other traits at the same time as hasIndirections, but the tests got extensive enough (and caught some bugs in the process) that I cut it down to just the one trait.