c3929dac6d2c096140908beece24087e0d40edde
[mono.git] / mcs / errors / cs0411-22.cs
1 // CS0411: The type arguments for method `AsyncTypeInference.Test2<T>(System.Func<int,T>)' cannot be inferred from the usage. Try specifying the type arguments explicitly
2 // Line: 11
3 // Compiler options: -langversion:future
4
5 using System;
6 using System.Threading.Tasks;
7
8 class AsyncTypeInference
9 {
10         public static int Main ()
11         {
12                 Test2 (async l => { await TT (); return null; } );
13                 return 0;
14         }
15         
16         static Task TT ()
17         {
18                 return Task.Factory.StartNew (() => 2);
19         }
20
21         static void Test2<T> (Func<int, T> arg)
22         {
23                 arg (0);
24         }
25 }