Make StringComparer.Create throw ArgumentNullException (#26570)
[mono-project.git] / mcs / tests / gtest-564.cs
bloba9887d6c4dc9e34c01580c28d4d902db736ef33f
1 using System;
3 struct S
7 abstract class B1<T1, T2>
9 public abstract void Test<U> (U x) where U : struct, T1, T2;
12 abstract class B2<T1, T2>
14 public abstract void Test<U> (U x) where U : class, T1, T2;
17 class C1 : B1<S, ValueType>
19 public override void Test<U> (U x)
24 class C2 : B2<string, object>
26 public override void Test<U> (U x)
31 class Test
33 public static int Main ()
35 var m = typeof (C1).GetMethod ("Test");
36 var ta = m.GetGenericArguments ()[0].GetGenericParameterConstraints ();
37 if (ta.Length != 2)
38 return 1;
40 m = typeof (C2).GetMethod ("Test");
41 ta = m.GetGenericArguments ()[0].GetGenericParameterConstraints ();
42 if (ta.Length != 1)
43 return 2;
45 Console.WriteLine ("ok");
46 return 0;