-
-
Notifications
You must be signed in to change notification settings - Fork 609
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 Issue 18251 - deprecate + transition=complex shouldn't look at functions with non-matching if constraints #12435
Conversation
|
Thanks for your pull request, @ibuclaw! 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 "master + dmd#12435" |
| compilable/diag20916.d(32): Deprecation: function `diag20916.Bar.toString!().toString` is deprecated | ||
| compilable/diag20916.d(32): Deprecation: template `diag20916.Bar.toString()()` is deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is declared as:
deprecated string toString()() const { return "42"; }
If you were to change it to...
deprecated { string toString()() const { return "42"; } }
You'd instead get a deprecation on the template.
So this new diagnostic is correct, as both deprecated template and deprecated { template } now give the same deprecation warning.
19e513e to
3c7f6e5
Compare
|
Bleh, I'll split this up into three, as it covers a few possibly sensitive areas. |
test/fail_compilation/fail21830.d
Outdated
| @@ -2,8 +2,6 @@ | |||
| TEST_OUTPUT | |||
| --- | |||
| fail_compilation/fail21830.d(24): Deprecation: struct `fail21830.OldS21830` is deprecated - Deprecated type | |||
| fail_compilation/fail21830.d(8): Deprecation: struct `fail21830.OldS21830` is deprecated - Deprecated type | |||
| fail_compilation/fail21830.d(24): instantiated from here: `test21830!(OldS21830)` | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This removal is in-fact related to #12440, no idea how it got auto-merged...
|
@thewilsonator unblocked and ready. |
…nctions with non-matching if constraints
One workaround for the issue was to put deprecated templates into a code block.
This patch makes it so that the test for issue 18251 has no difference to the above at an AST level.