[corlib] Use temp directory for assemblies in SaveTest.Save() (#5727)
[mono.git] / mcs / errors / cs4014-6.cs
1 // CS4014: The statement is not awaited and execution of current method continues before the call is completed. Consider using `await' operator
2 // Line: 47
3 // Compiler options: -warnaserror
4
5 using System;
6 using System.Runtime.CompilerServices;
7 using System.Threading.Tasks;
8
9 static class S
10 {
11         public static A GetAwaiter (this X x)
12         {
13                 return new A ();
14         }
15 }
16
17 class X
18 {
19         public X Foo ()
20         {
21                 return this;
22         }
23 }
24
25 class A : INotifyCompletion
26 {
27         bool IsCompleted
28         {
29                 get
30                 {
31                         return true;
32                 }
33         }
34
35         public void OnCompleted (Action a)
36         {
37         }
38
39         int GetResult ()
40         {
41                 return 3;
42         }
43
44         static async Task Test3 ()
45         {
46                 X x = new X ();
47                 x.Foo ();
48                 await x.Foo ();
49         }
50 }