Make obsolete abstract virtual #1770
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.
I have realized than obsoleting an abstract member is not very nice to implementors: it forces them to override an obsolete member. Once dropped, their code will no more compile, while the purpose of
Obsolete
is to allow consumers to make required changes for next version and avoid errors due to upgrading.Instead, we should switch such abstract member to virtual.
This is a kind of follow-up to #1599, since the only obsoleted abstract I have found was introduced there. (I have thought of this subject because I was starting to obsolete abstract members for another subject.)
There is somewhat a similar trouble with obsoleted interface members, but there is nothing we can do for them, and furthermore the implementor can implements them in a way that will not break compilation once they are dropped, contrary to abstract members.