Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-349.cs
1 using System.Collections;
2 using System;
3 using System.Reflection;
4
5 class X
6 {
7         public delegate R Function<T1, T2, R>(T1 arg1, T2 arg2);
8
9         public static int Main ()
10         {
11                 Delegate [] e = new Delegate [] {
12                         new Function<IList,IList,int> (f2),
13                         new Function<IList,object,int> (f2)
14                 };
15                 
16                 if ((int)e [0].DynamicInvoke (null, null) != 1)
17                         return 1;
18
19                 if ((int) e [1].DynamicInvoke (null, null) != 2)
20                         return 2;
21
22                 Console.WriteLine ("OK");
23                 return 0;
24         }
25
26         static int f2 (IList self, IList other) { return 1; }
27         static int f2 (IList self, object other) {return 2; }
28 }