Merge pull request #5406 from kumpera/fix_12157
[mono.git] / mono / tests / bug-472692.2.cs
1 public class Program
2 {
3     static void Main()
4     {
5         var t = new Foo<object>();
6         var asMethod = t.GetType().GetMethod("Bar");
7         var asInterface = asMethod.MakeGenericMethod(typeof(object));
8         var asMock = asInterface.Invoke(t, null);
9     }
10 }
11
12 public class Foo<T>
13 {
14     public virtual Helper<TInt> Bar<TInt>()
15     {
16         return new Helper<TInt>();
17     }
18 }
19
20 public class Helper<T> { }