linux-packaging-mono/mcs/tests/gtest-lambda-07.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

38 lines
438 B
C#

// Lambda parser tests
delegate void D ();
delegate void E (bool b);
public class C
{
static void Test (D d)
{
}
static void Test (object o, D d)
{
}
static void Test (D d1, D d2)
{
}
static void Test2 (object o, E e)
{
}
public static void Main ()
{
D e = () => { };
e = (D)null;
e = default (D);
Test (() => { });
Test (1, () => { });
Test (() => { }, () => { });
Test2 (null, (foo) => { });
}
}