[Mono-bugs] [Bug 65833][Nor] New - 3 level nested class with common name won't compile

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 13 Sep 2004 08:52:48 -0400 (EDT)


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 andrewarnott@byu.edu.

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

--- shadow/65833	2004-09-13 08:52:48.000000000 -0400
+++ shadow/65833.tmp.28825	2004-09-13 08:52:48.000000000 -0400
@@ -0,0 +1,54 @@
+Bug#: 65833
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: SuSE 9.1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: AndrewArnott@byu.edu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: 3 level nested class with common name won't compile
+
+Description of Problem:
+MCS fails with error when compiling a class with a few nested classes,
+where Microsoft's compiler suceeds with expected results. 
+
+Steps to reproduce the problem:
+1. Download the test.cs file attached to this bug report.
+2. Run "msc test.cs"
+
+Actual Results:
+test.cs(25) error CS1502: The best overloaded match for method ' A+C..ctor
+(A)' has some invalid arguments
+test.cs(25) error CS1503: Argument 0: Cannot convert from 'A+B' to 'A'
+test.cs(25) error CS1501: No overload for method `A+C' takes `1' arguments
+test.cs(25) error CS1501: New invocation: Can not find a constructor in
+`A+C' for this argument list
+Compilation failed: 4 error(s), 0 warnings
+
+
+Expected Results:
+Microsoft's compiler succeeds, following by this output when test.exe executes:
+A constructor
+A+C constructor
+A+B constructor
+A+B+C constructor
+
+How often does this happen? 
+Every time.
+
+Additional Information:
+I know this exploit code makes you scratch your head and wonder "why would
+you do that anyway?"  This is a simplified exploit of a more complex
+project that found the bug.  And Microsoft's compiler works with it fine. 
+I'm trying to port to Mono and I ran into this.
+
+I will attach test.exe, which is the results of Microsoft's compiler so you
+can run it or look at the IL or whatever else it might be useful for.