+2005-01-10 Marek Safar <marek.safar@seznam.cz>
+
+ Fix #71058
+ * attribute.cs (GetMethodObsoleteAttribute): Need to transform
+ accessors to its properties.
+
+ * ecore.cs (PropertyExpr): Add AccessorTable to help track back
+ from accessors to property.
+
2005-01-10 Marek Safar <marek.safar@seznam.cz>
Fix #70722
if (mb.DeclaringType is TypeBuilder)
return null;
+ PropertyInfo pi = PropertyExpr.AccessorTable [mb] as PropertyInfo;
+ if (pi != null)
+ return GetMemberObsoleteAttribute (pi);
+
return GetMemberObsoleteAttribute (mb);
}
LocalTemporary temp;
bool prepared;
+ internal static PtrHashtable AccessorTable = new PtrHashtable ();
+
public PropertyExpr (EmitContext ec, PropertyInfo pi, Location l)
{
PropertyInfo = pi;
PropertyInfo pi = (PropertyInfo) group [0];
if (getter == null)
- getter = pi.GetGetMethod (true);;
+ getter = pi.GetGetMethod (true);
if (setter == null)
- setter = pi.GetSetMethod (true);;
+ setter = pi.GetSetMethod (true);
MethodInfo accessor = getter != null ? getter : setter;
{
FindAccessors (ec.ContainerType);
- is_static = getter != null ? getter.IsStatic : setter.IsStatic;
+ if (getter != null) {
+ AccessorTable [getter] = PropertyInfo;
+ is_static = getter.IsStatic;
+ }
+
+ if (setter != null) {
+ AccessorTable [setter] = PropertyInfo;
+ is_static = setter.IsStatic;
+ }
}
bool InstanceResolve (EmitContext ec, bool must_do_cs1540_check)