Merge pull request #4419 from BrzVlad/fix-oom-nre
[mono.git] / mcs / tests / test-async-36.cs
1 using System;
2 using System.Threading.Tasks;
3
4 class X
5 {
6         internal Task<int> ExecuteInternalAsync ()
7         {
8                 return Task.FromResult (1);
9         }
10
11         public async Task<object> ExecuteReaderAsync ()
12         {
13                 await ExecuteInternalAsync ();
14                 return Task.FromResult (0);
15         }
16
17         public static int Main ()
18         {
19                 var at = new X ().ExecuteReaderAsync ();
20                 if (!at.Wait (1000))
21                         return 1;
22
23                 return 0;
24         }
25 }