X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fgenerics.cs;h=19282df514e273e5f2da45e6208e835255b34b58;hb=92d89b2b067df5ee75533d956b69d42a3dfac611;hp=b04319a467b527729e8d20726e5f6963a1ee9666;hpb=d0baa99bcb8ef12231e24432d0b5710b3a0a4380;p=mono.git diff --git a/mono/mini/generics.cs b/mono/mini/generics.cs index b04319a467b..19282df514e 100644 --- a/mono/mini/generics.cs +++ b/mono/mini/generics.cs @@ -959,9 +959,25 @@ class Tests { } } + class Foo3 where T : IComparable { + public static int CompareTo (T[] t) { + // This is a constrained call to Enum.CompareTo () + return t[0].CompareTo (t [0]); + } + } + public static int test_1_regress_constrained_iface_call_7571 () { var r = new Record [10]; Foo2.Extract (r); return Foo2.Extract (r); } + + enum ConstrainedEnum { + Val = 1 + } + + public static int test_0_regress_constrained_iface_call_enum () { + var r = new ConstrainedEnum [10]; + return Foo3.CompareTo (r); + } }