[Mono-bugs] [Bug 77929][Nor] New - [GMCS] incorrect CS0122 - private fields in nested container is inaccessible from nested types

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Mar 27 02:50:50 EST 2006


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 atsushi at ximian.com.

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

--- shadow/77929	2006-03-27 02:50:50.000000000 -0500
+++ shadow/77929.tmp.13140	2006-03-27 02:50:50.000000000 -0500
@@ -0,0 +1,47 @@
+Bug#: 77929
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] incorrect CS0122 - private fields in nested container is inaccessible from nested types
+
+gmcs incorrectly treats 1)private fields in the 2)container 3)generic type
+as inaccessible from a nested class.
+
+class Test<T>
+{
+        int priv;
+        private sealed class Inner<U>
+        {
+                Test<U> test;
+                void Foo ()
+                {
+                        test.priv = 0;
+                }
+        }
+}
+
+
+Actual Results:
+
+privaccess.cs(9,4): error CS0122: `Test<U>.priv' is inaccessible due to its
+protection level
+
+Expected Results:
+
+no CS0122.
+
+How often does this happen? 
+
+consistently.


More information about the mono-bugs mailing list