https://bugzilla.novell.com/show_bug.cgi?id=442257

User [EMAIL PROTECTED] added comment
https://bugzilla.novell.com/show_bug.cgi?id=442257#c4





--- Comment #4 from Alan McGovern <[EMAIL PROTECTED]>  2008-11-11 06:35:01 MST 
---
This makes my previous attempt at a fix wrong then. They must be doing
x.CompareTo (x) != 1.

In short: You should expect undefined behaviour when the IComparer is invalid.
You will get different behaviour depending on what class is doing the sorting,
even on the same framework.

The problem is class X might do:

public void Sort ()
{
    if (compare (array[i], array[i+1]) > 1)
          Swap (i, i+1);
}

and class Y will do:

public void Sort ()
{
    if (compare (array[i], array[i-1]) > 1)
          Swap (i, i-1);
}

When you swap the order, you change the outcome. I'm marking the previous patch
as invalid because it doesn't have the same behaviour as MS.NET.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to