[Mono-bugs] [Bug 24851] New - Nested type cannot access private members of containing type

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
16 May 2002 21:38:15 -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 dihlewis@yahoo.co.uk.

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

--- shadow/24851	Thu May 16 17:38:14 2002
+++ shadow/24851.tmp.12790	Thu May 16 17:38:14 2002
@@ -0,0 +1,36 @@
+Bug#: 24851
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dihlewis@yahoo.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Nested type cannot access private members of containing type
+
+The C# spec (10.2.6) says that X should be visible to B.
+
+
+
+class A {
+        private static int X = 0;
+
+        class B {
+                void Foo ()
+                {
+                        ++ X;
+                }
+        }
+
+        public static void Main ()
+        {
+        }
+}