Merge branch 'cecil-light'
[mono.git] / mono / tests / verifier / valid_transitive_constraints.cs
1 using System;
2
3 public interface ICacheable {}
4
5 public class Foo<T, U> where T : U, new() where U : ICacheable, new()
6 {
7         public object Test () {
8                 return new Bar<T> ();
9         }
10
11 }
12
13 public class Bar<T> where T : ICacheable {}
14
15 public class Test : ICacheable {}
16
17 public class Program
18 {
19     static void Main()
20     {
21                 var x = new Foo<Test, Test> ();
22                 x.Test ();
23     }
24 }