[build] Fix warning (#4177)
[mono-project.git] / mcs / tests / test-async-89.cs
blob5a69685ca94c7d4705715bfebcaa44db5a335a35
1 using System;
2 using System.Threading.Tasks;
4 class X
6 public static void Main ()
8 new X ().Test ();
11 void Test ()
13 object v1 = null;
15 Action a = () =>
17 if (v1 == null)
19 object v2 = null;
21 Action a2 = () =>
23 Console.WriteLine (v2);
26 Action a3 = async () =>
28 // This scope needs to access to Scope which can do ldftn on instance method
30 Func<Task> a4 = async () =>
32 await Foo ();
36 await Task.Yield ();
39 a3 ();
43 a ();
46 async Task Foo ()
48 await Task.FromResult (1);