summaryrefslogtreecommitdiff
path: root/mcs/tests/gtest-lambda-35.cs
blob: 4cfd316d42c990fe8d2dc22fa640e1441bec5a1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;

class C
{
	static int Foo (Func<short> b)
	{
		return 1;
	}

	static int Foo (Func<int> a)
	{
		return 2;
	}

    static int Main()
    {
    	if (Foo (() => 1) != 2)
    		return 1;

    	if (Foo (() => (short) 1) != 1)
    		return 2;

    	if (Foo (() => (byte) 1) != 1)
    		return 3;

        Console.WriteLine ("ok");
        return 0;
    }

}