-// Compiler options: -langversion:future
-
-using System;
-using System.Linq.Expressions;
using System.Threading.Tasks;
class C
{
- static Task Method ()
+ public async Task SynchronousCall (int arg)
+ {
+ AnotherTask (arg);
+ }
+
+ Task AnotherTask (int arg)
{
- return null;
+ return Task.FromResult (arg);
}
public static void Main ()
{
- Expression<Action<int>> a = async l => Method ();
- a.Compile () (1);
+ new C ().SynchronousCall (1);
}
-}
+}
\ No newline at end of file