+2002-07-19 Martin Baulig <martin@gnome.org>
+
+ * expression.cs (Invocation.EmitParams): Use TypeManager.LookupType(),
+ not Type.GetType() to lookup the array type. This is needed when
+ we're constructing an array of a user-defined type.
+ (ArrayAccess.EmitDynamicInitializers): Only emit the Ldelema for
+ single-dimensional arrays, but also for single-dimensial arrays of
+ type decimal.
+
2002-07-19 Martin Baulig <martin@gnome.org>
* expression.cs (New.DoEmit): Create a new LocalTemporary each time
string array_type = t.FullName + "[]";
LocalBuilder array;
- array = ig.DeclareLocal (Type.GetType (array_type));
+ array = ig.DeclareLocal (TypeManager.LookupType (array_type));
IntConstant.EmitInt (ig, count);
ig.Emit (OpCodes.Newarr, TypeManager.TypeToCoreType (t));
ig.Emit (OpCodes.Stloc, array);
}
is_builtin_type = TypeManager.IsBuiltinType (type);
-
+
if (is_builtin_type) {
Expression ml;
// If we are dealing with a struct, get the
// address of it, so we can store it.
//
- if (etype.IsSubclassOf (TypeManager.value_type) &&
- !TypeManager.IsBuiltinType (etype)){
+ if ((dims == 1) &&
+ etype.IsSubclassOf (TypeManager.value_type) &&
+ (!TypeManager.IsBuiltinType (etype) ||
+ etype == TypeManager.decimal_type)) {
if (e is New){
New n = (New) e;
ig.Emit (OpCodes.Ldelema, etype);
}
-
+
e.Emit (ec);
if (dims == 1)