[Mono-bugs] [Bug 65833][Nor] New - 3 level nested class with common name won't compile
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 email@example.com.
--- 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 @@
+Product: Mono: Compilers
+OS Details: SuSE 9.1
+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"
+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
+Microsoft's compiler succeeds, following by this output when test.exe executes:
+How often does this happen?
+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.