+
+Tue Jul 9 19:03:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+ * TypeBuilder.cs: special case SerializarionAttribute.
+ Tweaks to get correct code in corlib.
+
2002-07-06 Miguel de Icaza <miguel@ximian.com>
* ILGenerator.cs (ILGenerator.Emit): For doubles and floats, swap
}
protected override bool IsArrayImpl () {
- // FIXME
- return false;
+ return type_is_subtype_of (this, typeof (System.Array), false);
}
protected override bool IsByRefImpl () {
// FIXME
return false;
}
protected override bool IsValueTypeImpl () {
- // test this one
- return type_is_subtype_of (this, pmodule.assemblyb.corlib_value_type, false);
+ //Console.WriteLine ("is value type: {0}: {1} ({2}) base: {3}", AssemblyQualifiedName, type_is_subtype_of (this, pmodule.assemblyb.corlib_value_type, false), pmodule.assemblyb.corlib_value_type.AssemblyQualifiedName, BaseType != null?BaseType.AssemblyQualifiedName: "");
+ return (type_is_subtype_of (this, pmodule.assemblyb.corlib_value_type, false) || type_is_subtype_of (this, typeof(System.ValueType), false));
+// this != pmodule.assemblyb.corlib_value_type &&
+// this != typeof (System.Enum); /* FIXME: handle a TypeBuilder System.Enum */
+
+/* return type_is_subtype_of (this, typeof(System.ValueType), false) &&
+ this != typeof(System.ValueType) &&
+ this != typeof (System.Enum);*/
}
public override RuntimeTypeHandle TypeHandle { get { return _impl; } }
}
}
return;
+ } else if (attrname == "System.SerializableAttribute") {
+ attrs |= TypeAttributes.Serializable;
+ return;
}
if (cattrs != null) {
CustomAttributeBuilder[] new_array = new CustomAttributeBuilder [cattrs.Length + 1];