I noticed recently that we don't alert to misuse of the NaNConstraint. The constrain is only coded to work for double or float (though I think "Single" will also work as {single} is float will evaluate to true).
Other types, such as guids, ints, etc, will always fail (or always pass in the case of Is.Not.NaN). Either case indicates a misuse that could be alerted about. Analyzers have previously triggered an "error" for these cases where it would never pass. Would a "warning" be appropriate for cases which always pass?
I noticed recently that we don't alert to misuse of the
NaNConstraint. The constrain is only coded to work fordoubleorfloat(though I think "Single" will also work as{single} is floatwill evaluate to true).Other types, such as guids, ints, etc, will always fail (or always pass in the case of
Is.Not.NaN). Either case indicates a misuse that could be alerted about. Analyzers have previously triggered an "error" for these cases where it would never pass. Would a "warning" be appropriate for cases which always pass?