Jonas Nyrup
Jonas Nyrup
I did a related analysis in https://github.com/fluentassertions/fluentassertions/issues/1781#issuecomment-1016784748
This is indeed an interesting area, which I'm following closely. For anyone else interested [here](https://devblogs.microsoft.com/dotnet/try-out-nullable-reference-types/) a blog describing the features. If we add this, it should align with #1074. As...
Be aware that these attributes will also *not* be available in .netstandard 2.0. See Philip Carters [comment](https://devblogs.microsoft.com/dotnet/try-out-nullable-reference-types/#comments-2649).
This comment: > ... It's currently a bit tricky when multitargeting. We've updated the specification for .NET Standard 2.1 to include all of the more advanced attributes so that you...
I did play with it in https://github.com/jnyrup/fluentassertions/commits/nullableReferenceTypes As nullability is not part of the method signature we should be able to do this after shipping 6.0 without introducing breaking ABI/API...
I sure know that C# 8 is still in preview, that's why I keep the nullable annotation changes in a branch, which I have no intentions to create a PR...
I hacked up some [reflection code](https://github.com/jnyrup/fluentassertions/tree/nullReflection) in my search to eliminate `NullReferenceException`s thrown from FA. It found 92 ways where we could throw a `NullReferenceException`. [NullReferenceExceptions.txt](https://github.com/fluentassertions/fluentassertions/files/3509387/NullReferenceExceptions.txt)
Yay - we're down to 83 [NullReferenceExceptions.txt](https://github.com/fluentassertions/fluentassertions/files/5564943/NullReferenceExceptions.txt)
Down to 54 [NullReferenceExceptions.txt](https://github.com/fluentassertions/fluentassertions/files/6477250/NullReferenceExceptions.txt)
32 [NullReferenceExceptions.txt](https://github.com/fluentassertions/fluentassertions/files/6482484/NullReferenceExceptions.txt)