1 // Compiler options: -langversion:future
4 using System.Threading.Tasks;
6 class AsyncTypeInference
8 public static int Main ()
10 Test (async l => await Task.Factory.StartNew (() => 1));
11 Test (async l => { return await Task.Factory.StartNew (() => 1); });
12 Test2 (async l => { await TT (); } );
18 return Task.Factory.StartNew (() => 2);
21 static void Test<T> (Func<int, Task<T>> arg)
26 static void Test2<T> (Func<int, T> arg)