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-09-05 15:11:41 +0400
committerMarek Safar <marek.safar@gmail.com>2011-09-05 22:02:32 +0400
commitab89771a4892d8c1641da6b68278be3a41dc08f9 (patch)
tree53006c624ab9d85fd2517b24cb0b9177c24d3f3c /mcs/tests/test-anon-110.cs
parent1bb13c6a6852359e9bf296abe878c2548420277a (diff)
Unify anonymous method test names
Diffstat (limited to 'mcs/tests/test-anon-110.cs')
-rw-r--r--mcs/tests/test-anon-110.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/mcs/tests/test-anon-110.cs b/mcs/tests/test-anon-110.cs
new file mode 100644
index 00000000000..b632c6bc2db
--- /dev/null
+++ b/mcs/tests/test-anon-110.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+
+class X
+{
+ public IEnumerable<T> Test<T> (T a, T b)
+ {
+ yield return b;
+ b = a;
+ yield return a;
+ }
+
+ static int Main ()
+ {
+ X x = new X ();
+ long sum = 0;
+ foreach (long i in x.Test (3, 5)) {
+ Console.WriteLine (i);
+ sum += i;
+ }
+
+ Console.WriteLine (sum);
+ return sum == 8 ? 0 : 1;
+ }
+}