Add [MemberNotNullWhen] to PatchResult#611
Conversation
|
Thanks for the suggestion, but this library is .Net Standard 2.0, and that compiler directive will never be triggered. I actually just had a conversation on Twitter regarding things like this that make the code harder to maintain. I prefer to avoid them. |
OK, I just found #460 which seems to indicate that you were having plans to upgrade or multi target at some point. |
|
Upgrade eventually, yes, but not multi-target. As it stands, I apparently have some consumers at Microsoft that are still using Framework, so moving off of Standard probably won't be for a bit (or at least until I can articulate a convincing reason to get them to update our leave them behind). |
|
I'm going to close this for now, but I'll definitely make these kinds of updates in the future. Thanks for the suggestion. |
|
@ivarne I've retargeted this PR to |
|
Thanks! This isn't my first PR, but if it was it would have mattered a lot. |
This removes the nullability warning when writing code like
This won't word before the library starts to (multi) target net5 or greater, but I still think it makes sense to have it ready as soon as that happens.