-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Better management of negated expressions #31028
Conversation
af35cdc
to
68deb19
Compare
@@ -875,7 +875,7 @@ where type.IsVisible | |||
from method in type.GetMethods(AnyInstance) | |||
where method.DeclaringType == type | |||
&& !Fixture.NonVirtualMethods.Contains(method) | |||
&& (!method.IsVirtual || method.IsFinal) | |||
&& !method.IsVirtual |
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.
@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
src/EFCore.Relational/Query/Internal/SqlExpressionSimplifyingExpressionVisitor.cs
Show resolved
Hide resolved
src/EFCore.Relational/Query/Internal/SqlExpressionSimplifyingExpressionVisitor.cs
Show resolved
Hide resolved
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
Note that this PR is based on top of #30976 (review only the last commit)Closes #31027