[mcs] Allow properties and indexers of by-ref values to be set without setter
[mono.git] / mcs / errors / cs4027.cs
1 // CS4027: The awaiter type `A' must implement interface `System.Runtime.CompilerServices.INotifyCompletion'
2 // Line: 33
3
4 using System.Threading.Tasks;
5
6 static class S
7 {
8         public static A GetAwaiter (this int i)
9         {
10                 return new A ();
11         }
12 }
13
14 class A
15 {
16         bool IsCompleted {
17                 get {
18                         return true;
19                 }
20         }
21         
22         public void OnCompleted (System.Action a)
23         {
24         }
25
26         int GetResult ()
27         {
28                 return 3;
29         }
30         
31         static async Task<int> Test1 ()
32         {
33                 await 1;
34         }
35 }