New test.
[mono.git] / mcs / tests / gtest-anon-24.cs
index 4bc12f7747cf00a7319c839b299017f055efc81c..ad01bcbdc2b7ae0dc35980fd2c74bf28ebe3c77e 100644 (file)
@@ -1,6 +1,8 @@
 using System;
 using System.Collections.Generic;
 
+// Generics mutate tests
+
 class Disposable<T> : IDisposable
 {
        public void Dispose ()
@@ -113,6 +115,17 @@ class Test
                };
        }
        
+       public void ArrayMutate<T> (T[] array)
+       {
+               int r = 4;
+               Action<int> anonMeth = delegate (int slc) {
+                       long[] idx = new long[] { 0, 0 };
+                       for (int i = 0; i < r; i++) {
+                               idx [0] = i;
+                       }
+               };
+       }
+       
        public static int Main ()
        {
                if (For (new List<int> { 5, 10 })() [1] != 10)
@@ -157,4 +170,4 @@ class Test
                Console.WriteLine ("OK");
                return 0;
        }
-}
\ No newline at end of file
+}