[Mono-bugs] [Bug 30244][Wis] New - Accessing nonstatic members of outer class

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
12 Sep 2002 15:14:36 -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 martin@gnome.org.

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

--- shadow/30244	Thu Sep 12 11:14:36 2002
+++ shadow/30244.tmp.309	Thu Sep 12 11:14:36 2002
@@ -0,0 +1,38 @@
+Bug#: 30244
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: martin@gnome.org                            
+ReportedBy: martin@gnome.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Accessing nonstatic members of outer class
+
+This must report a CS0038: Cannot access a nonstatic member of outer type `X' via nested type `X.Y'.
+
+using System;
+
+class X
+{
+	int a = 5;
+
+	class Y
+	{
+		public Y ()
+		{
+			Console.WriteLine (a);
+		}
+	}
+
+	static void Main ()
+	{
+	}
+}