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:
authorMartin Baulig <martin@novell.com>2004-07-14 18:28:04 +0400
committerMartin Baulig <martin@novell.com>2004-07-14 18:28:04 +0400
commite45d10831c922888a3d7476d8a7a8cd6331fdd4b (patch)
treee1769199a3396d6f4e62e71ce78c1dacfcab9443 /mcs/errors/cs1625.cs
parentda88e6b66ed7004064dc3b636c2a1191a541464c (diff)
2004-07-14 Martin Baulig <martin@ximian.com>
* cs1623.cs, cs1624.cs, cs1625.cs, cs1631.cs: New tests for iterators. svn path=/trunk/mcs/; revision=31139
Diffstat (limited to 'mcs/errors/cs1625.cs')
-rw-r--r--mcs/errors/cs1625.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/mcs/errors/cs1625.cs b/mcs/errors/cs1625.cs
new file mode 100644
index 00000000000..5dfe2603f94
--- /dev/null
+++ b/mcs/errors/cs1625.cs
@@ -0,0 +1,22 @@
+// CS1625: Cannot yield in the body of a finally clause
+// Line: 13
+using System;
+using System.Collections;
+
+class X
+{
+ public static IEnumerable Test (int a)
+ {
+ try {
+ ;
+ } finally {
+ yield return 0;
+ }
+ }
+
+ static void Main ()
+ {
+ IEnumerable a = Test (3);
+ Console.WriteLine (a);
+ }
+}