You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found during adding nullable annotations to TypeConverter (#54961)
Currently TypeDescriptor.GetTypeDescriptor returns null when instance is null.
Consider changing that logic to return EmptyCustomTypeDescriptor and changing nullability of return type.
Current logic causes that GetTypeDescriptor needs to return nullable ICustomTypeDescriptor which causes that base class needs to be annotated the same which adds lots of unnecessary !. Returning EmptyCustomTypeDescriptor seems more consistent with other implementations though and also seems no code in the framework expects that API to return null.
Please make sure to track usages and remove unnecessary ! along the way when fixing this
The text was updated successfully, but these errors were encountered:
Tagging subscribers to this area: @safern
See info in area-owners.md if you want to be subscribed.
Issue Details
Found during adding nullable annotations to TypeConverter (#54961)
Currently TypeDescriptor.GetTypeDescriptor returns null when instance is null.
Consider changing that logic to return EmptyCustomTypeDescriptor and changing nullability of return type.
Current logic causes that GetTypeDescriptor needs to return nullable ICustomTypeDescriptor which causes that base class needs to be annotated the same which adds lots of unnecessary !. Returning EmptyCustomTypeDescriptor seems more consistent with other implementations though and also seems no code in the framework expects that API to return null.
Found during adding nullable annotations to TypeConverter (#54961)
Currently TypeDescriptor.GetTypeDescriptor returns null when instance is null.
Consider changing that logic to return EmptyCustomTypeDescriptor and changing nullability of return type.
Current logic causes that GetTypeDescriptor needs to return nullable ICustomTypeDescriptor which causes that base class needs to be annotated the same which adds lots of unnecessary
!
. Returning EmptyCustomTypeDescriptor seems more consistent with other implementations though and also seems no code in the framework expects that API to return null.Please make sure to track usages and remove unnecessary
!
along the way when fixing thisThe text was updated successfully, but these errors were encountered: