1 // Compiler options: -langversion:future
4 using System.Threading.Tasks;
5 using System.Threading;
9 int Value { get; set; }
14 public S (int a1, string a2)
20 public int Value { get; set; }
22 public void SetValue (int value)
30 async Task<T> NewInitTestGen<T> () where T : struct, IFoo
35 Value = await Task.Factory.StartNew (() => 13).ConfigureAwait (false)
44 public static int Main ()
46 var t = new Tester().NewInitTestGen<S> ();
48 if (!Task.WaitAll (new[] { t }, 1000)) {
52 if (t.Result.Value != 13)