diff options
author | Martin Baulig <martin@novell.com> | 2004-07-14 18:28:04 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2004-07-14 18:28:04 +0400 |
commit | e45d10831c922888a3d7476d8a7a8cd6331fdd4b (patch) | |
tree | e1769199a3396d6f4e62e71ce78c1dacfcab9443 /mcs/errors/cs1625.cs | |
parent | da88e6b66ed7004064dc3b636c2a1191a541464c (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.cs | 22 |
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); + } +} |