X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Fgtest-165.cs;h=1d79d2574c1d33a08baae5d3df132b07dec50dd3;hb=56f1d451006c9194af19b7a5bf9c37d65ed8051c;hp=6ed567b228835f4e4e418c5ecd21d01dea8ad0b4;hpb=c4aef31eeea309e6a795c84c098ac8e1a2490340;p=mono.git diff --git a/mcs/tests/gtest-165.cs b/mcs/tests/gtest-165.cs index 6ed567b2288..1d79d2574c1 100644 --- a/mcs/tests/gtest-165.cs +++ b/mcs/tests/gtest-165.cs @@ -1,33 +1,13 @@ -using System; -using System.Collections; - -class X { - delegate void A (); - - static IEnumerable GetIt (int [] args) - { - foreach (int arg in args) { - Console.WriteLine ("OUT: {0}", arg); - A a = delegate { - Console.WriteLine ("arg: {0}", arg); - return; - }; - a (); - yield return arg; - } - } - - static int Main () - { - int total = 0; - foreach (int i in GetIt (new int [] { 1, 2, 3})){ - Console.WriteLine ("Got: " + i); - total += i; - } - - if (total != 6) - return 1; - - return 0; - } -} +// Compiler options: -r:gtest-165-lib.dll + +class C +{ + public static int Main () + { + var a = new A(); + if (a ["s"] != 2) + return 1; + + return 0; + } +} \ No newline at end of file