Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2011-08-18 13:09:48 +0400
committerMarek Safar <marek.safar@gmail.com>2011-08-18 13:10:28 +0400
commitdd74d35c85cc29b0020d2de5d212ab26da5ebce1 (patch)
tree4ffc613620cc6fcd2c45b8f79f29a10a2411e656 /mcs/tests/test-async-22.cs
parent9bc3024f1e57750f98234af28b4a258079231956 (diff)
Make async keyword context sensitive
Diffstat (limited to 'mcs/tests/test-async-22.cs')
-rw-r--r--mcs/tests/test-async-22.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/mcs/tests/test-async-22.cs b/mcs/tests/test-async-22.cs
new file mode 100644
index 00000000000..2f4d62cf92d
--- /dev/null
+++ b/mcs/tests/test-async-22.cs
@@ -0,0 +1,48 @@
+// Compiler options: -langversion:future
+
+using System;
+using System.Threading.Tasks;
+
+// contextual async during parsing
+
+class A
+{
+ async Task<int> async ()
+ {
+ int async;
+ throw new NotImplementedException ();
+ }
+
+ async Task async (int async)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public static int Main ()
+ {
+ return 0;
+ }
+}
+
+class B
+{
+ class async
+ {
+ async (async arg)
+ {
+ }
+ }
+}
+
+class async
+{
+ async (async arg)
+ {
+ }
+}
+
+[async]
+class asyncAttribute: Attribute
+{
+ delegate async async (async async);
+} \ No newline at end of file