kevin-montrose / Cesil

Modern CSV (De)Serializer
MIT License
65 stars 3 forks source link

Determine if "impossible" case in ReflectionExtensionMethods are testable #3

Closed kevin-montrose closed 3 years ago

kevin-montrose commented 4 years ago

Cesil has has extension methods in ReflectionExtensionMethods for use in reflection-y code that DRY things up and makes sure nulls are caught early.

There are four places where a null check is necessary, according to nullable annotations in the BCL, that are currently untested. If these can be tested, they should be - if not, the todos should be replaced with comments explaining why they are impossible and null forgiveness operators (ie. !) used instead of the ifs.