[Microsoft.CSharp] Replaced with CoreFX implementation
[mono.git] / mcs / tests / test-496.cs
index 4e3125a7741248a392997451558cb6520da9d67d..e06d36611c18991101a281157c7c18b1e030528e 100644 (file)
@@ -1,41 +1,13 @@
-using System;
-using System.Collections;
+// Compiler options: -unsafe
 
-public class Test
+unsafe class Baz
 {
-       public IEnumerator GetEnumerator ()
+       struct Foo
        {
-               yield return "TEST";
-               try {
-                       int.Parse (arg);
-               } catch {
-                       yield break;
-               }
-               yield return "TEST2";
+               public Foo *next;
        }
-
-       static void Main ()
-       {
-               new Test ().Run ();
-       }
-
-       string arg;
-
-       void Run ()
+       
+       public static void Main ()
        {
-               int i = 0;
-               foreach (string s in this)
-                       i++;
-               if (i != 1)
-                       throw new Exception ();
-
-               arg = "1";
-               i = 0;
-               foreach (string s in this)
-                       i++;
-               if (i != 2)
-                       throw new Exception ();
        }
 }
-
-