Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-anon-45.cs
index a3e73857cf3cf658a895c3bd7a7df4caa09bcec7..3c57a3b697a2509c4caa925c4b91e337e9b40a20 100644 (file)
@@ -1,17 +1,20 @@
-using System;
-using System.Collections;
+delegate void TestFunc (int val);
 
-public class Test
+class A
 {
-        public static void Main ()
-        {
-                foreach (object o in new Test ())
-                        Console.WriteLine (o);
-        }
+       public A(TestFunc func)
+       {
+               func (0);
+       }
+}
+
+class TestClass
+{
+       static int i = 1;
+       static readonly A a = new A(delegate(int a) { i = a; });
 
-        public IEnumerator GetEnumerator ()
-        {
-               int i = 2;
-               yield return 3;
-        }
+       public static int Main ()
+       {
+               return i;
+       }
 }