Move IL verifier test to the right folder.
[mono.git] / mono / tests / metadata-verifier / assembly-with-generics.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 public class Simple<T,K>  {
5         public static void Gen<D>() {
6                 Simple<D,T>.Gen<K> ();
7         }
8         public T t;
9 }
10
11 public class Generic<A,B,C,D,E> 
12         where B : class
13         where C : struct
14         where D : new()
15         where E : class, new()
16 {
17 }
18
19
20 public interface A {}
21 public interface Z<T> {}
22
23 public class TypeWithConstraints<T>
24         where T : A, IComparable, IComparable<string>, Z<string>
25 {
26         
27 }
28
29
30 public class Driver
31 {
32         public void GenericMethod<A,B,C,D,E> ()
33                 where B : class
34                 where C : struct
35                 where D : new()
36                 where E : class, new() 
37         {
38         }
39
40         public static void Main ()
41         {
42                 var x = new Simple<int, double> ();
43                 var y = x.t;
44                 Simple<int, double>.Gen<string> ();
45                 Simple<int, object>.Gen<Type> ();
46         }
47 }