[Mono-bugs] [Bug 43191][Wis] New - Missing warning/error in mcs

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 16 May 2003 18:52:50 -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 seguso.forever@tin.it.

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

--- shadow/43191	Fri May 16 18:52:50 2003
+++ shadow/43191.tmp.6917	Fri May 16 18:52:50 2003
@@ -0,0 +1,36 @@
+Bug#: 43191
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: seguso.forever@tin.it               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Missing warning/error in mcs
+
+It would be nice if mcs gave a warning (or an error?) whenever you   
+forget to initialize a readonly member variable.  
+  
+(This can be done in the constructor or in the variable declaration)  
+  
+The microsoft compiler (csc) does it, I seem to recall. 
+ 
+examples: 
+ 
+class c{ 
+  public readonly int i; 
+ 
+ c(){} 
+ 
+} 
+  
+ 
+warning: readonly fields must be initialized in either the constructor or the class