[Mono-bugs] [Bug 52146][Min] New - MCS does not respect private ctors

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 7 Feb 2004 12:38:28 -0500 (EST)


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 miguel@ximian.com.

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

--- shadow/52146	2004-02-07 12:38:28.000000000 -0500
+++ shadow/52146.tmp.21336	2004-02-07 12:38:28.000000000 -0500
@@ -0,0 +1,41 @@
+Bug#: 52146
+Product: Mono/Compilers
+Version: unspecified
+OS: unknown
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: MCS does not respect private ctors
+
+Description of Problem:
+If a class has a private ctor, it cant be used.
+
+
+Steps to reproduce the problem:
+class A { A () {}}
+class T : A {
+	static void Main () { T t = new T (); }
+}
+
+Actual Results:
+Compile
+
+Expected Results:
+No compile.
+
+Additional Information:
+Is it also a runtime bug that this program runs?
+
+------- Additional Comments From miguel@ximian.com  2003-12-14 10:35 -------
+We should basically check things on the class base declaration:
+
+A.A() is inaccessible due to its protection level