summaryrefslogtreecommitdiff
path: root/mcs/tests/test-async-52.cs
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/tests/test-async-52.cs')
-rw-r--r--mcs/tests/test-async-52.cs23
1 files changed, 23 insertions, 0 deletions
diff --git a/mcs/tests/test-async-52.cs b/mcs/tests/test-async-52.cs
new file mode 100644
index 0000000000..36230acd77
--- /dev/null
+++ b/mcs/tests/test-async-52.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Threading.Tasks;
+
+public delegate T ActualValueDelegate<T> ();
+
+class X
+{
+ public static void Main ()
+ {
+ Matches (async () => await Throw());
+ }
+
+ static bool Matches<T>(ActualValueDelegate<T> del) where T : Task
+ {
+ del ().Wait ();
+ return true;
+ }
+
+ static async Task Throw()
+ {
+ await Task.Delay (1);
+ }
+} \ No newline at end of file