Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-async-60.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Threading.Tasks;
4
5 class C : B
6 {
7 }
8
9 class B
10 {
11 }
12
13 class X
14 {
15         public static void Main ()
16         {
17                 var x = new X ();
18                 x.AlignTwoItems ().Wait ();
19         }
20
21         public async Task AlignTwoItems ()
22         {
23                 var items = new [] {
24                         (C) await AddItemAt (20, 20),
25                         (C) await AddItemAt (40, 40)
26                 };
27                 await MoveItemBy (items, 1, 1);
28
29                 Console.WriteLine ((C) items [0]);
30                 Console.WriteLine ((C) items [1]);
31         }
32
33         Task MoveItemBy (object o, int a, int b)
34         {
35                 return Task.FromResult (2);
36         }
37
38         async Task<B> AddItemAt (int a, int b)
39         {
40                 return new C ();
41         }
42 }