Fix Issue 11455 - Overriding template methods should raise a compile …#15350
Fix Issue 11455 - Overriding template methods should raise a compile …#15350RazvanN7 merged 2 commits intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @ntrel! 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 "master + dmd#15350" |
|
This seems to break Vectorflow: |
| if (tpl) | ||
| { | ||
| if (storage_class & STC.override_) | ||
| error(loc, "a function template cannot be `override`"); |
There was a problem hiding this comment.
Maybe a bit more info would come in handy. Something along the lines of: "Function templates are never virtual, therefore they cannot override anything." and then add an error supplemental stating: "override used to be accepted and ignored on function templates. Please delete the override keyword."
|
Also, maybe we should use a deprecation first. Vectorflow looks unmaintained, I'll raise a PR to fix the failure, but chances are it's gonna get ignored. |
dlang#15350) * Fix Issue 11455 - Overriding template methods should raise a compile error * Change to deprecation; tweak messages
…error
@RazvanN7 This implements Improving Error Messages (view)