[interp] Fall back to old implementation when calling on proxy
[mono-project.git] / mcs / tests / test-async-43.cs
blob9c8ba5f9bb071efc7633033d174768d5fc2b9c20
1 using System;
2 using System.Threading.Tasks;
4 class A
6 public Task<int> GetValue (int b)
8 return Task.FromResult (b);
12 class C
14 public static int Main ()
16 var c = new C ();
17 return c.Foo ().Result;
20 public A Instance {
21 get {
22 return new A ();
26 async Task<int> Foo ()
28 int value = 1;
31 int b = 3;
32 await Test (value,
33 async () => {
34 await Instance.GetValue (b);
35 });
38 return 0;
41 T Test<T> (int arg, Func<T> func)
43 return func ();