X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Ftest-anon-45.cs;h=3c57a3b697a2509c4caa925c4b91e337e9b40a20;hb=HEAD;hp=a3e73857cf3cf658a895c3bd7a7df4caa09bcec7;hpb=5d9434fcb3acc1ed7d3d30603faae797d672fe65;p=mono.git diff --git a/mcs/tests/test-anon-45.cs b/mcs/tests/test-anon-45.cs index a3e73857cf3..3c57a3b697a 100644 --- a/mcs/tests/test-anon-45.cs +++ b/mcs/tests/test-anon-45.cs @@ -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; + } }