Bugzilla – Bug 318741
[PATCH] mcs emit public ctor for private ctor that invokes base ctor
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by gert.driesen@pandora.be 2005-08-14 11:26:33 MST ---- When a private ctor invokes a base ctor, mcs emits a public ctor instead. To reproduce this issue, compile and run the following code snippet: using System; using System.Reflection; public class A { public static void Main () { ConstructorInfo ctor = typeof(A).GetConstructor( BindingFlags.Public | BindingFlags.Instance, null, new Type[0], null); if (ctor != null) { Console.WriteLine ("Public instance ctor found!"); } } private A() : base() { } } Actual result: Public instance ctor found Expected result: No output on console as no public ctor exists for class A. ---- Additional Comments From atsushi@ximian.com 2005-08-30 01:54:07 MST ---- Created an attachment (id=168368) proposed fix ---- Additional Comments From gert.driesen@pandora.be 2005-11-17 16:14:06 MST ---- *** https://bugzilla.novell.com/show_bug.cgi?id=MONO76736 has been marked as a duplicate of this bug. *** ---- Additional Comments From marek.safar@seznam.cz 2006-03-26 09:32:45 MST ---- Fixed in SVN. Imported an attachment (id=168368) Unknown operating system unknown. Setting to default OS "Other".