* expression.cs (EmitLoadOpcode): System.Char is a U2, use that
instead of the default for ValueTypes.
svn path=/trunk/mcs/; revision=5742
2002-07-12 Miguel de Icaza <miguel@ximian.com>
- * expression.cs (New.DoEmit): Use IsValueType instead of
+ * expression.cs (EmitLoadOpcode): System.Char is a U2, use that
+ instead of the default for ValueTypes.
+
+ (New.DoEmit): Use IsValueType instead of
IsSubclassOf (value_type)
(New.DoResolve): ditto.
(Invocation.EmitCall): ditto.
ig.Emit (OpCodes.Ldelem_I1);
else if (type == TypeManager.short_type)
ig.Emit (OpCodes.Ldelem_I2);
- else if (type == TypeManager.ushort_type)
+ else if (type == TypeManager.ushort_type || type == TypeManager.char_type)
ig.Emit (OpCodes.Ldelem_U2);
else if (type == TypeManager.int32_type)
ig.Emit (OpCodes.Ldelem_I4);