4 public class Container
<T
>
5 where T
: IComparable
<T
>
9 public class ReferenceType
: IComparable
<ReferenceType
>
13 public int CompareTo (ReferenceType obj
)
19 public struct MyValueType
: IComparable
<MyValueType
>
23 public int CompareTo (MyValueType obj
)
31 public static void Main ()
33 // Compilation succeeds, constraint satisfied
34 new Container
<ReferenceType
> ();
36 // Compilation fails, constraint not satisfied according to mcs,
37 // the unmodified testcase compiles successfully with csc
38 new Container
<MyValueType
> ();