[Mono-bugs] [Bug 33678][Nor] New - mcs does not indicate some errors in constructor syntax

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
12 Nov 2002 06:41:29 -0000


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 mathpup@mylinuxisp.com.

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

--- shadow/33678	Tue Nov 12 01:41:29 2002
+++ shadow/33678.tmp.21641	Tue Nov 12 01:41:29 2002
@@ -0,0 +1,64 @@
+Bug#: 33678
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: SuSE Linux 8.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mathpup@mylinuxisp.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not indicate some errors in constructor syntax
+
+Description of Problem: 
+ 
+Constructors that are neither extern nor abstract are required to supply a 
+(possibly-empty) body: { ... }, but mcs does not flag errors when this is not the case. 
+ 
+ 
+Steps to reproduce the problem: 
+1. Attempt to compile the program below 
+ 
+using System; 
+ 
+public class Testing 
+{ 
+	public Testing( int value ) {} 
+	 
+	public Testing(): this( 4 ); 
+ 
+	public Testing(bool x); 
+ 
+	public static void Main() {} 
+} 
+ 
+ 
+ 
+Actual Results: 
+ 
+"Compilation succeeded" 
+ 
+Expected Results: 
+ 
+/home/marcus/semicolon.cs(7,29): error CS1514:         { expected 
+ 
+/home/marcus/semicolon.cs(7,30): error CS1513:         } expected 
+ 
+semicolon.cs(9,9): error CS0501:         'Testing.Testing(bool)' must declare a body 
+because it is not marked abstract or extern 
+ 
+How often does this happen?  
+ 
+Always 
+ 
+Additional Information: 
+ 
+The error messages above are from csc in Rotor. By the way, csc apparently stops 
+processing after the error on line 7 because I had to comment out line 7 to get csc to 
+flag the error on line 9.