[Mono-bugs] [Bug 81044][Nor] Changed - Missing exception from invalid cast.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Mar 8 12:41:29 EST 2007

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


--- shadow/81044	2007-03-08 11:48:10.000000000 -0500
+++ shadow/81044.tmp.27713	2007-03-08 12:41:29.000000000 -0500
@@ -48,6 +48,16 @@
 Please attach either the buggy generated binary or the IL code so we
 can add it to the verifier test suite. The test doesn't compile with
 gmcs for me:
 gmcs-invalidcast.cs(8,48): error CS0030: Cannot convert type
 `System.Collections.Generic.IList<object>' to `string[]'
+------- Additional Comments From lupus at ximian.com  2007-03-08 12:41 -------
+Ok, with an updated gmcs it compiled: gmcs thinks it doesn't need to
+insert a cast opcode when storing into array: this is most likely a
+gmcs bug as doing the cast in IL code generates the exception.
+As for the verifier: this check is currently missing
+(mini.c:target_type_is_incompatible), mostly because it is likely to
+trigger with some methods in the presence of interface vars.
+I'll see if implementing the check makes at least a full bootstrap

More information about the mono-bugs mailing list