[Mono-bugs] [Bug 29435][Nor] New - Derived classes can use private fields of base classes
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
26 Aug 2002 03:11:19 -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=29435
--- shadow/29435 Sun Aug 25 23:11:19 2002
+++ shadow/29435.tmp.17680 Sun Aug 25 23:11:19 2002
@@ -0,0 +1,43 @@
+Bug#: 29435
+Product: Mono/MCS
+Version: unspecified
+OS:
+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: Derived classes can use private fields of base classes
+
+Steps to reproduce the problem:
+1. compile this:
+using System;
+
+class A
+{
+ int integer;
+}
+
+class B : A
+{
+ int a;
+
+ void MyMethod ()
+ {
+ a = integer;
+ }
+}
+
+Actual Results:
+Compilation successful.
+
+Expected Results:
+newbug.cs(14,7): error CS0122: 'A.integer' is inaccessible due to its
+protection level