[Mono-bugs] [Bug 35631][Nor] Changed - Improper scoping for nested classes.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
19 Dec 2002 18:12:10 -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 seank@users.sf.net.

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

--- shadow/35631	Thu Dec 19 12:50:37 2002
+++ shadow/35631.tmp.31283	Thu Dec 19 13:12:10 2002
@@ -1,12 +1,12 @@
 Bug#: 35631
 Product: Mono/MCS
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: NEEDINFO   
+Status: REOPENED   
 Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: seank@users.sf.net               
@@ -86,6 +86,36 @@
 
 ------- Additional Comments From miguel@ximian.com  2002-12-19 12:50 -------
 This program fails with both CSC and MCS with the same error cs0038. 
 I fail to see the problem.
 
 I am setting the status to NEEDINFO based on the above comment.
+
+------- Additional Comments From seank@users.sf.net  2002-12-19 13:12 -------
+The code above has a bug in it, here's a slightly different version
+that works in CSC but fails to compile in MCS.
+
+using System;
+
+public class Parent
+{
+  public Parent() { }
+  private Collide Collide;
+}
+public class Child : Parent
+{
+  Child() { }
+  public class Nested
+  {
+    Nested()
+    {
+      Collide test=Collide.Die;
+    }
+  }
+}
+
+public class Collide
+{
+  Collide() { }
+  public static readonly Collide Die = new Collide();
+}
+