Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-582.cs
1 // Compiler options: -r:gtest-582-lib.dll
2
3 using System;
4 using System.Reflection;
5
6 public class G1 : GC<C>
7 {
8 }
9
10 public class GC<T> where T : C
11 {
12 }
13
14 class Program
15 {
16         public static int Main()
17         {
18                 var constraints = typeof (GC<>).GetGenericArguments ()[0].GetGenericParameterConstraints ();
19                 if (constraints.Length != 1)
20                         return 1;
21                 if (constraints [0] != typeof (C))
22                         return 2;
23
24                 Console.WriteLine ("ok");
25                 return 0;
26         }
27 }