[Mono-bugs] [Bug 76736][Nor] New - MCS adds a default public ctor if ": base ()" is used

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Nov 17 16:06:40 EST 2005


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

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

--- shadow/76736	2005-11-17 16:06:40.000000000 -0500
+++ shadow/76736.tmp.1138	2005-11-17 16:06:40.000000000 -0500
@@ -0,0 +1,64 @@
+Bug#: 76736
+Product: Mono: Compilers
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: sebastien at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: MCS adds a default public ctor if ": base ()" is used
+
+Description of Problem:
+MCS adds a default public ctor if ": base ()" is used on another (e.g.
+private) ctor.
+
+
+Steps to reproduce the problem:
+1. Compile the following program with MCS
+
+using System;
+using System.Reflection;
+ 
+class Program {
+ 
+        private Program () : base ()
+        {
+        }
+ 
+        static void Main ()
+        {
+                Console.WriteLine (typeof (Program).GetConstructors ().Length);
+        }
+}
+
+2. Execute under Linux and then Windows
+3. Compile the same source using CSC
+4. Execute under Linux and then Windows
+
+
+Actual Results:
+MCS compiled
+Linux: 1
+Windows: 1
+
+CSC compiled
+Linux: 0
+Windows: 0
+
+Expected Results:
+Always 0
+
+How often does this happen? 
+Always when MCS is used to compile.
+
+Additional Information:
+This was the strange ctor extra in System.Text.RegularExpressions.Match
+that has been present for ages.


More information about the mono-bugs mailing list