New test.
[mono.git] / mcs / tests / gtest-223.cs
1 // Bug #76551
2 using System;
3 using System.Reflection;
4
5 public abstract class Foo<T> where T : class
6 {
7 }
8
9 public class Test
10 {
11         public Foo<K> Hoge<K> () where K : class { return null; }
12
13         public static void Main ()
14         {
15                 MethodInfo mi = typeof (Test).GetMethod ("Hoge");
16                 foreach (Type t in mi.GetGenericArguments ())
17                         if ((t.GenericParameterAttributes & GenericParameterAttributes.ReferenceTypeConstraint) == 0)
18                                 throw new Exception ();
19         }
20 }
21