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

29 lines
353 B
C#

// Type inference when creating delegates
using System;
delegate int D (string s, int i);
delegate int E ();
class X
{
public static T F<T> (string s, T t)
{
return t;
}
public static T G<T> ()
{
throw new ArgumentException ();
}
public static void Main ()
{
D d1 = new D (F<int>);
D d2 = new D (F);
E e1 = new E (G<int>);
}
}