GenericParameter.cs: override Module properly
[mcs.git] / tests / gtest-219.cs
blob9bf413a16f390a5c5fafb1b7b5305dac468839f6
1 using System;
2 using System.Reflection;
4 public interface IFoo : ICloneable {}
6 public class Test
8 public void Foo<T> () where T : IFoo {}
10 public static int Main ()
12 MethodInfo mi = typeof (Test).GetMethod ("Foo");
13 Type t = mi.GetGenericArguments () [0];
14 Type[] ifaces = t.GetGenericParameterConstraints ();
15 if (ifaces.Length != 1)
16 return 1;
17 if (ifaces [0] != typeof (IFoo))
18 return 2;
19 return 0;