Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

28 lines
571 B
C#

using System.Collections;
using System;
using System.Reflection;
class X
{
public delegate R Function<T1, T2, R>(T1 arg1, T2 arg2);
public static int Main ()
{
Delegate [] e = new Delegate [] {
new Function<IList,IList,int> (f2),
new Function<IList,object,int> (f2)
};
if ((int)e [0].DynamicInvoke (null, null) != 1)
return 1;
if ((int) e [1].DynamicInvoke (null, null) != 2)
return 2;
Console.WriteLine ("OK");
return 0;
}
static int f2 (IList self, IList other) { return 1; }
static int f2 (IList self, object other) {return 2; }
}