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

test-async-09.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4171bd7e5be38a5fbe35877c8b32e491de084b62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Threading.Tasks;

class Test
{
	static int Foo<T> (Func<T, Task<int>> f)
	{
		return 1;
	}
	
	static int Foo<T> (Func<T, Task<short>> f)
	{
		return 2;
	}

	public static int Main ()
	{
		if (Foo (async (string str) => (short) 1) != 2)
			return 1;
		
		return 0;
	}
}