Merge pull request #216 from ilkerde/master
[mono.git] / mcs / tests / test-async-22.cs
1 using System;
2 using System.Threading.Tasks;
3
4 // contextual async during parsing
5
6 class A
7 {
8         async Task<int> async ()
9         {
10                 int async;
11                 throw new NotImplementedException ();
12         }
13
14         async Task async (int async)
15         {
16                 throw new NotImplementedException ();
17         }
18         
19         async void CastTest ()
20         {
21                 var res = (int) await async ();
22                 var res2 = (Int32) await async ();
23         }
24
25         public static int Main ()
26         {
27                 return 0;
28         }
29 }
30
31 class B
32 {
33         class async
34         {
35                 async (async arg)
36                 {
37                 }
38         }
39 }
40
41 class async
42 {
43         async (async arg)
44         {
45                 int await = 0;
46         }
47 }
48
49 class await
50 {
51         await (await arg)
52         {
53         }
54 }
55
56 [async]
57 class asyncAttribute: Attribute
58 {
59         delegate async async (async async);
60 }