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
{{ message }}
Repository navigation
ComparisonIdentity.Structural.Compare returns different values for Option wrapped types #576
Now I doubt if anyway is using comparers in any other way than < 0 or > 0, but they may be? #513 is a potentially breaking change because it returns -1 for the Option case - i.e. matching the primitive operation (although the affects of this breaking case, to Option comparison operations being sensitive to particular return values - is almost vanishingly small I would say..)
(The good news is that if in my regression limits Compare to (sign of Compare) then I'm getting no regression errors. I'll put my regression test up soon)
I have just fixed #513 to regression test properly (I.e. it now acts in same way as existing configuration), but this is still an oddity of the existing configuration along with the #527 & #556 (although this is less severe than those)
I agree. (For regression purposes trying to just be 100% with what is currently there so I don't have to look at any individual cases, but I would like to achieve ComparerIdentity.Structural as equal to System.Collections.Generic.Comparers.Default where they shouldn't differ - even if it is still "valid": values)
Activity
manofstick commentedon Aug 8, 2015
Playing around a bit this seems to be the case only for primitives that are < 32 bits. Even more smaller probability that this affects real code...
manofstick commentedon Aug 10, 2015
I have just fixed #513 to regression test properly (I.e. it now acts in same way as existing configuration), but this is still an oddity of the existing configuration along with the #527 & #556 (although this is less severe than those)
latkin commentedon Aug 10, 2015
I don't think this is worth worrying about. It's well-documented that comparison results should only be considered for 0, < 0 or > 0.
manofstick commentedon Aug 10, 2015
I agree. (For regression purposes trying to just be 100% with what is currently there so I don't have to look at any individual cases, but I would like to achieve ComparerIdentity.Structural as equal to System.Collections.Generic.Comparers.Default where they shouldn't differ - even if it is still "valid": values)
dsyme commentedon Aug 14, 2015
Yes, this is not a bug, will close it as by design