class.c (mono_bounded_array_class_get): Properly init
cast_class to take the fact that uint[] and int[] can be
casted between each other.
Fixes #555950.
svn path=/trunk/mono/; revision=155012
+2010-04-07 Rodrigo Kumpera <rkumpera@novell.com>
+
+ class.c (mono_bounded_array_class_get): Properly init
+ cast_class to take the fact that uint[] and int[] can be
+ casted between each other.
+
+ Fixes #555950.
+
2010-04-08 Zoltan Varga <vargaz@gmail.com>
* icall.c (ves_icall_System_Enum_ToObject): Avoid a crash for unfinished type
else
class->cast_class = eclass;
+ switch (class->cast_class->byval_arg.type) {
+ case MONO_TYPE_I1:
+ class->cast_class = mono_defaults.byte_class;
+ break;
+ case MONO_TYPE_U2:
+ class->cast_class = mono_defaults.int16_class;
+ break;
+ case MONO_TYPE_U4:
+#if SIZEOF_VOID_P == 4
+ case MONO_TYPE_I:
+ case MONO_TYPE_U:
+#endif
+ class->cast_class = mono_defaults.int32_class;
+ break;
+ case MONO_TYPE_U8:
+#if SIZEOF_VOID_P == 8
+ case MONO_TYPE_I:
+ case MONO_TYPE_U:
+#endif
+ class->cast_class = mono_defaults.int64_class;
+ break;
+ }
+
class->element_class = eclass;
if ((rank > 1) || bounded) {