[Mono-bugs] [Bug 79345][Blo] New - Compiler, runtime problems with generics.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Sep 9 15:10:43 EDT 2006


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 miguel at ximian.com.

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

--- shadow/79345	2006-09-09 15:10:43.000000000 -0400
+++ shadow/79345.tmp.8247	2006-09-09 15:10:43.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 79345
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: miguel at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Compiler, runtime problems with generics.
+
+This bug shows up in the compiler, but has an impact on the runtime and in
+particular it prevents the Visual Basic compiler from working.
+
+using System;
+using System.Collections.Generic;
+
+interface I {
+    void D ();
+}
+
+class X : I {
+        static void Main ()
+        {
+            List<object> l = new List<object> ();
+            List<I> i = new List<I> ();
+
+            i.Add (new X());
+
+            l.AddRange (i.ToArray());
+
+        }
+
+    public void D () {}
+}
+
+That program should compile with gmcs.
+
+Once that program compiles, the next step is to run the resulting code, the
+resulting code will crash the Mono runtime.


More information about the mono-bugs mailing list