fix issue 17791 - add __traits(deprecated, symbol) #7178
fix issue 17791 - add __traits(deprecated, symbol) #7178MartinNowak merged 2 commits intodlang:masterfrom
Conversation
|
Thanks for your pull request, @dunkyp! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla references
|
|
Would it make sense to somehow make the deprecation message introspectable too? |
|
We also need a way to obtain any compiler messages/errors, so I would prefer to leave this PR as it is and focus on a more general solution, like something along the lines of: struct S
{
auto opDispatch(string member, T...)(T args)
{
static if (args.length % 42 < 13)
static assert (0, "Solve the mystery!");
//...
}
}
enum string[] messages = __traits(captureStdErrOutput,
{
S s;
s.theAnswer(1, 2);
});
static assert (messages.canFind("Solve the mystery!")); |
|
This should have been accompanied
@dunkyp would you be so kind to submit the spec & changelog PR? Thanks! |
|
Btw has anyone considered the possibility to add this to the existing |
|
I also considered |
No description provided.