[Mono-bugs] [Bug 69389][Nor] New - Support for properties accessor modifiers

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 11 Nov 2004 20:51: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 carlos@unixmexico.org.

http://bugzilla.ximian.com/show_bug.cgi?id=69389

--- shadow/69389	2004-11-11 20:51:49.000000000 -0500
+++ shadow/69389.tmp.30656	2004-11-11 20:51:49.000000000 -0500
@@ -0,0 +1,54 @@
+Bug#: 69389
+Product: Mono: Runtime
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: carlos@unixmexico.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Support for properties accessor modifiers
+
+When a property get accessor is defined with an access modifier,
+Type.GetProperties (BindingFlags.Public | ...) won't return the property,
+even when it is public, because it checks the acccess based in the Get
+accessor.
+
+For example, in
+
+ public int Count {
+  protected get {
+    return 0;
+  }
+  set {
+ }
+
+Won't be returned when calling GetProperties (BindingFlags.Public |
+BindingFlags.Instance), because the runtime checks the get accessor
+attributes, which are protected and the property is considered as protected
+too. Note, however, that the property should be returned, since it is
+declared as public. 
+
+Attached is a patch that gets both accessor and tries to determine which
+one has the less restrictive access to select it as the base for the access
+check.
+
+
+1. Compile the sample.
+2. Run with mono.
+
+Actual Results:
+Nothing appears.
+
+Expected Results:
+Count
+
+How often does this happen? 
+Always