[Mono-bugs] [Bug 35627][Min] New - mcs does not handle a field declared as "const string Test = null"

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
15 Dec 2002 04:51:31 -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=35627

--- shadow/35627	Sat Dec 14 23:51:31 2002
+++ shadow/35627.tmp.12441	Sat Dec 14 23:51:31 2002
@@ -0,0 +1,45 @@
+Bug#: 35627
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mathpup@mylinuxisp.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs does not handle a field declared as "const string Test = null"
+
+Description of Problem: 
+ 
+If a field is declared as "const string Test = null", mcs complains: 
+"error CS0029: Cannot convert implicitly from `object' to `string'." 
+ 
+Steps to reproduce the problem: 
+1. Attempt to compile with "mcs string2.cs" 
+ 
+ 
+Actual Results: 
+ 
+string2.cs(5) error CS0029: Cannot convert implicitly from `object' to `string' 
+ 
+ 
+Expected Results: 
+ 
+Successful compilation 
+ 
+How often does this happen?  
+ 
+Always 
+ 
+Additional Information: 
+ 
+The attached test case compiles with csc from Rotor. (By the way, I'm not the crazy 
+person who wanted a named constant for null! Someone asked me about this error, and 
+I'm reporting it.)