2010-06-03 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-511.cs
blob7ec699ee956229f640fff54e97b1bdcdf819ec5b
1 interface IA : IB
5 interface IB
9 class A<T> where T : IA
13 class C
15 public virtual void Foo<T> (A<T> t) where T : IA
20 class D : C
22 public override void Foo<T> (A<T> t)
26 public static int Main ()
28 new D ();
30 var m = typeof (D).GetMethod ("Foo");
31 var ga = m.GetGenericArguments() [0];
33 var tpConstraints = ga.GetGenericParameterConstraints();
34 if (tpConstraints.Length != 1)
35 return 1;
37 if (tpConstraints [0] != typeof (IA))
38 return 2;
40 return 0;