Bug 318296 (MONO75300) - [GMCS] multidimensional generic arrays do not accept subtypes of actual element type
Summary: [GMCS] multidimensional generic arrays do not accept subtypes of actual eleme...
Status: RESOLVED FIXED
Alias: MONO75300
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.0
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-17 23:09 UTC by Kamil Skalski
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:21:42 UTC


---- Reported by nazgul@omega.pl 2005-06-17 16:09:22 MST ----

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:



---- Additional Comments From martin@ximian.com 2005-06-20 12:56:44 MST ----

Fixed in SVN.


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>mono svn from 17.06.2005</cf_op_sys_details>
Unknown operating system unknown. Setting to default OS "Other".