[Mono-bugs] [Bug 75300][Wis] New - [GMCS] multidimensional generic arrays do not accept subtypes of actual element type

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jun 17 16:09:22 EDT 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 nazgul at omega.pl.

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

--- shadow/75300	2005-06-17 16:09:22.000000000 -0400
+++ shadow/75300.tmp.15194	2005-06-17 16:09:22.000000000 -0400
@@ -0,0 +1,62 @@
+Bug#: 75300
+Product: Mono: Runtime
+Version: 1.0
+OS: 
+OS Details: mono svn from 17.06.2005
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: nazgul at omega.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] multidimensional generic arrays do not accept subtypes of actual element type
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+You cannot store Nil<int> : list<int> in list<int>[,]
+
+Steps to reproduce the problem:
+1. Compile gmcs t.cs
+
+class list <a> {
+}
+
+class Nil <a> : list <a> {
+  public static Nil <a> single;
+  static Nil () {
+    single = new Nil <a> ();
+  }
+}
+
+
+public class Test {
+   public static void Main()  {
+     list <int>[,] x = new list<int>[10,10];
+     x[0,0] = Nil <int>.single;
+
+   }
+}
+
+2. Run mono t.exe
+
+Actual Results:
+Unhandled Exception: System.ArrayTypeMismatchException: Source array type
+cannot be assigned to destination array type.
+in (wrapper managed-to-native)
+System.Object:__icall_wrapper_helper_stelem_ref_check (object,object)
+in <0x00031> Test:Main ()
+
+
+Expected Results:
+clear run
+
+How often does this happen? 
+Always
+
+Additional Information:


More information about the mono-bugs mailing list