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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80260 --- shadow/80260 2007-02-04 00:24:45.000000000 -0500 +++ shadow/80260.tmp.4755 2007-02-04 00:29:18.000000000 -0500 @@ -64,6 +64,31 @@ Mono without any problem. ------- Additional Comments From [EMAIL PROTECTED] 2007-02-04 00:24 ------- Created an attachment (id=18615) This patch will fix bug 80260 + +------- Additional Comments From [EMAIL PROTECTED] 2007-02-04 00:29 ------- +I've attached a patch that will fix the problem on the compiler end. + +In testing the patch, I discovered that the runtime does not always behave like the +Microsoft implementation. For example, the following program will compile under the +Microsoft implementation, but the conversion will throw an exception: + +using System.Collections.Generic; + +class CantCastGenericListToArray +{ + public static void Main(string[] args) + { + IList<object> list = new object[] { "foo", "bar" }; + string[] array = (string[])list; + if (list.Count != array.Length) + { + throw new System.ApplicationException(); + } + } +} + +However, no exceptions will be thrown in Mono. Does this qualify as a separate bug, or +should this one be left open? _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
