[Mono-bugs] [Bug 75479][Nor] Changed - [GMCS] GC is confused by generic structs

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Nov 16 09:23:00 EST 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by martin at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=75479

--- shadow/75479	2005-11-15 18:41:07.000000000 -0500
+++ shadow/75479.tmp.10313	2005-11-16 09:23:00.000000000 -0500
@@ -191,6 +191,39 @@
 All other test cases work - the only one which is not working is
 Michal's which is not an attachment (which should print 0foo 1foo 2foo
 3foo 4fee).
 
 ------- Additional Comments From malekith at pld-linux.org  2005-11-15 18:41 -------
 Hm, which testcase? I don't remember it.
+
+------- Additional Comments From martin at ximian.com  2005-11-16 09:23 -------
+This one is still not working for me:
+
+=====
+struct Cont<T> {
+  public T f;
+}
+
+class C2 {
+  public Cont<string> c;
+
+  public C2 (int n) {
+    c.f = n.ToString () + "foo";
+  }
+}
+
+class M {
+  public static void Main ()
+  {
+    int n = 5;
+    C2[] ar = new C2[n];
+        for (int i = 0; i < n; ++i) {
+          ar [i] = new C2(i);
+      System.GC.Collect ();
+    }
+        for (int i = 0; i < n; ++i)
+          System.Console.WriteLine (ar[i].c.f);
+  }
+}
+
+
+=====


More information about the mono-bugs mailing list