[Mono-bugs] [Bug 70129][Nor] Changed - Private events are not really private
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 3 Dec 2004 19:27:49 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by duncan@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=70129
--- shadow/70129 2004-12-03 19:25:12.000000000 -0500
+++ shadow/70129.tmp.25400 2004-12-03 19:27:49.000000000 -0500
@@ -99,6 +99,32 @@
------- Additional Comments From duncan@ximian.com 2004-12-03 19:25 -------
Created an attachment (id=13403)
event-visibility.patch (3rd try)
+
+------- Additional Comments From duncan@ximian.com 2004-12-03 19:27 -------
+After talking to Miguel:
+
+2004-12-02 Duncan Mak <duncan@ximian.com>
+
+ * ecore.cs (PropertyExpr.IsAccessorAccessible): Moved to
+ Expression class.
+ (Expression.IsAccessorAccessible): Moved from the PropertyExpr to
+ here as a static method. Take an additional bool out parameter
+ `must_do_cs1540_check' for signaling to InstanceResolve.
+ (PropertyExpr.InstanceResolve): Removed the `must_do_cs1540_check'
+ member field from PropertyExpr class and made it an argument of
+ the method instead.
+ (EventExpr.InstanceResolve): Copied from PropertyExpr, removed the
+ check for MarshalByRefObject, and report CS0122 instead of CS1540.
+ (EventExpr.DoResolve): Call IsAccessorAccessible on `add_accessor'
+ and `remove_accessor' as well as InstanceResolve: report CS0122
+ where applicable.
+
+ Fixes #70129.
+
+I also have a patch for mcs/errors, and it adds the above 2 cases:
+(1) accessing a private event,
+(2) accessing a protected event in Base from Derived via an instance
+of Base