-
-
Notifications
You must be signed in to change notification settings - Fork 544
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
Correctly specify nullability of Subject for NumericAssertions
#2472
Comments
7 tasks
I created a draft-PR to clarify, what my suggestion looks like. |
That draft PR seems to be using a |
Sorry, I forgot to remove some unrelated changes. I updated the PR #2473 accordingly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background and motivation
The Subject of
NumericAssertions
is always not-null, but becauseNullableNumericAssertions
inherits from it, the subject was specified as nullable. This causes a lot of warnings (e.g. "Possible 'System.InvalidOperationException'").I suggest to add a new base class
NumericAssertionsBase
which also gets the type of the subject and thus theNullableNumericAssertions
now has a nullable subject and the subject ofNumericAssertions
is not-null.Alternative Concerns
No response
Are you willing help with a pull-request?
Yes, please assign this issue to me.
The text was updated successfully, but these errors were encountered: