EncoderReplacementFallbackBuffer.Reset() did not really reset its internals.
[mono-project/dkf.git] / mcs / tests / test-async-21.cs
blobb45c43b47e9371719f95ebaa9051516f8fc23b9d
1 // Compiler options: -langversion:future
3 using System;
4 using System.Threading.Tasks;
6 class S
8 public A GetAwaiter ()
10 return new A ();
14 class A
16 bool IsCompleted {
17 get {
18 return false;
22 void OnCompleted (System.Action a)
24 a ();
27 int GetResult ()
29 return 3;
32 static async Task<int> Test1 ()
34 dynamic d = new S ();
35 return await d;
38 public static int Main ()
40 var r = Test1 ();
41 if (!Task.WaitAll (new [] { r }, 1000))
42 return 1;
44 Console.WriteLine ("ok");
45 return 0;