--- /dev/null
+using System;\r
+\r
+public delegate void D ();\r
+\r
+public class A\r
+{\r
+ [Obsolete ("Please use ...", true)]\r
+ protected event D comparer {\r
+ add {\r
+ }\r
+ remove {\r
+ }\r
+ }\r
+}
\ No newline at end of file
CS0433-lib.dll CS0433-2-lib.dll \
CS0534-3-lib.dll CS0534-4-lib.dll CS0571-3-lib.dll \
CS0612-2-lib.dll CS0618-2-lib.dll CS0619-8-lib.dll CS0619-17-lib.dll CS0619-32-lib.dll CS0619-33-lib.dll CS0619-36-lib.dll CS0619-42-lib.dll \
- CS0619-43-lib.dll CS1546-lib.dll CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \
+ CS0619-43-lib.dll CS1546-lib.dll CS0619-51-lib.dll CS2015-lib.dll CS3005-16-lib.dll CS3013-module.dll CSExternAlias-lib.dll \
$(EXTRA_SUPPORT_FILES)
all-local:
--- /dev/null
+// cs0619-51.cs: `A.comparer' is obsolete: `Please use ...'
+// Line: 16\r
+// Compiler options: -reference:CS0619-51-lib.dll\r
+\r
+using System;\r
+using System.Collections;\r
+\r
+public class B : A\r
+{\r
+ void test ()\r
+ {\r
+ }\r
+ \r
+ public void AA ()\r
+ {\r
+ comparer += new D (test);\r
+ }\r
+ \r
+ public static void Main () {}\r
+}\r
cs0548-4.cs
cs0548.cs
cs0567.cs
-cs0612-2.cs NO ERROR
cs0619-42.cs
cs0631-2.cs
cs0647-3.cs
cs0548-4.cs
cs0548.cs
cs0567.cs
-cs0612-2.cs NO ERROR
cs0619-42.cs
cs0631-2.cs
cs1501-5.cs
+2006-07-08 Marek Safar <marek.safar@seznam.cz>
+
+ * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
+ for accessors as well.
+ * ecore.cs (EventExpr): Add AccessorTable.
+
2006-07-03 Martin Baulig <martin@ximian.com>
* ecore.cs (UnboxCast.Emit): Also use `Unbox_Any' for generic
if (mb.IsSpecialName) {
PropertyInfo pi = PropertyExpr.AccessorTable [mb] as PropertyInfo;
if (pi != null) {
- // FIXME: This is buggy as properties from this assembly are included as well
+ if (TypeManager.LookupDeclSpace (pi.DeclaringType) == null)
+ return GetMemberObsoleteAttribute (pi);
+
+ return null;
+ }
+
+ EventInfo ei = EventExpr.AccessorTable [mb] as EventInfo;
+ if (ei != null) {
+ if (TypeManager.LookupDeclSpace (ei.DeclaringType) == null)
+ return GetMemberObsoleteAttribute (ei);
+
return null;
- //return GetMemberObsoleteAttribute (pi);
}
}
bool is_static;
MethodInfo add_accessor, remove_accessor;
+
+ internal static PtrHashtable AccessorTable = new PtrHashtable ();
public EventExpr (EventInfo ei, Location loc)
{
add_accessor = TypeManager.GetAddMethod (ei);
remove_accessor = TypeManager.GetRemoveMethod (ei);
+ if (add_accessor != null)
+ AccessorTable [add_accessor] = ei;
+ if (remove_accessor != null)
+ AccessorTable [remove_accessor] = ei;
if (add_accessor.IsStatic || remove_accessor.IsStatic)
is_static = true;
+2006-07-08 Marek Safar <marek.safar@seznam.cz>
+
+ * attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Fixed to look
+ for accessors as well.
+ * ecore.cs (EventExpr): Add AccessorTable.
+
2006-07-01 Marek Safar <marek.safar@seznam.cz>
A fix for #78738
if (mb.IsSpecialName) {
PropertyInfo pi = PropertyExpr.AccessorTable [mb] as PropertyInfo;
if (pi != null) {
- // FIXME: This is buggy as properties from this assembly are included as well
+ if (TypeManager.LookupDeclSpace (pi.DeclaringType) == null)
+ return GetMemberObsoleteAttribute (pi);
+
+ return null;
+ }
+
+ EventInfo ei = EventExpr.AccessorTable [mb] as EventInfo;
+ if (ei != null) {
+ if (TypeManager.LookupDeclSpace (ei.DeclaringType) == null)
+ return GetMemberObsoleteAttribute (ei);
+
return null;
- //return GetMemberObsoleteAttribute (pi);
}
}
bool is_static;
MethodInfo add_accessor, remove_accessor;
+
+ internal static PtrHashtable AccessorTable = new PtrHashtable ();
public EventExpr (EventInfo ei, Location loc)
{
add_accessor = TypeManager.GetAddMethod (ei);
remove_accessor = TypeManager.GetRemoveMethod (ei);
+ if (add_accessor != null)
+ AccessorTable [add_accessor] = ei;
+ if (remove_accessor != null)
+ AccessorTable [remove_accessor] = ei;
if (add_accessor.IsStatic || remove_accessor.IsStatic)
is_static = true;