[Mono-bugs] [Bug 32742][Nor] New - mcs fails to check access for properties

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
23 Oct 2002 17:29:27 -0000


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 gonzalo@ximian.com.

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

--- shadow/32742	Wed Oct 23 13:29:27 2002
+++ shadow/32742.tmp.12918	Wed Oct 23 13:29:27 2002
@@ -0,0 +1,43 @@
+Bug#: 32742
+Product: Mono/MCS
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs fails to check access for properties
+
+The first test case:
+class A
+{
+        int i;
+
+        int prop
+        {
+                set { i = value; }
+        }
+}
+
+class B : A
+{
+        void M ()
+        {
+                this.prop = 2;
+        }
+}
+
+mcs should compiles it, but should issue an error:
+prop.cs(15,3): error CS0122: 'A.prop' is inaccessible due to its protection
+level
+
+i'm gonna attach another test case that should give the same error, but
+instead it bails out with a NullReferenceException.