Better management of negated expressions#31028
Merged
roji merged 1 commit intodotnet:mainfrom Jun 5, 2023
Merged
Conversation
af35cdc to
68deb19
Compare
roji
commented
Jun 4, 2023
| where method.DeclaringType == type | ||
| && !Fixture.NonVirtualMethods.Contains(method) | ||
| && (!method.IsVirtual || method.IsFinal) | ||
| && !method.IsVirtual |
Member
Author
There was a problem hiding this comment.
@AndriySvyryd note this change which allows marking methods as sealed... This is to allow https://github.com/dotnet/efcore/pull/31028/files#diff-13f563541479291311be1ed3fba340a2d34cd0a187b7c6fb03b79b4c4db93b74R719, where I want to prevent people from accidentally overriding the wrong thing. This feels OK as it's a very explicit gesture (unlike forgetting to mark a method with virtual), I can already add it to the NonVirtualMethods set (but why force me to do this "twice"), and we also allow sealed types above.
68deb19 to
8fdba79
Compare
maumar
reviewed
Jun 5, 2023
maumar
reviewed
Jun 5, 2023
maumar
reviewed
Jun 5, 2023
maumar
approved these changes
Jun 5, 2023
Contributor
|
changes look good - ok to check-in provided @AndriySvyryd signs off on the protected sealed thing and once the api consistency test is changed accordingly |
a4312cb to
4749606
Compare
4749606 to
8b8af81
Compare
AndriySvyryd
approved these changes
Jun 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note that this PR is based on top of #30976 (review only the last commit)Closes #31027