Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-variance-4.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a2618d0bec5d51369b01ec00af5a56f80d5b97fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
delegate int Foo<in T> (T t);

public class Test
{
	static int Main ()
	{
		string message = "Hello World!";
		Foo<object> foo = (o) => o.GetHashCode ();
		if (Bar (foo, message) != message.GetHashCode ())
			return 1;

		return 0;
	}

	static int Bar (Foo<string> foo, string s)
	{
		return foo(s);
	}
}