diff options
author | Marek Safar <marek.safar@gmail.com> | 2011-08-18 13:09:48 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2011-08-18 13:10:28 +0400 |
commit | dd74d35c85cc29b0020d2de5d212ab26da5ebce1 (patch) | |
tree | 4ffc613620cc6fcd2c45b8f79f29a10a2411e656 /mcs/tests/test-async-22.cs | |
parent | 9bc3024f1e57750f98234af28b4a258079231956 (diff) |
Make async keyword context sensitive
Diffstat (limited to 'mcs/tests/test-async-22.cs')
-rw-r--r-- | mcs/tests/test-async-22.cs | 48 |
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 |