[Mono-bugs] [Bug 24510] New - Wrong error message given by mcs

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
10 May 2002 13:27:50 -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 detlev@die-offenbachs.de.


--- shadow/24510	Fri May 10 09:27:50 2002
+++ shadow/24510.tmp.17559	Fri May 10 09:27:50 2002
@@ -0,0 +1,38 @@
+Bug#: 24510
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: SuSE 8.0
+Status: NEW   
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: detlev@die-offenbachs.de               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Wrong error message given by mcs
+The attached example taken from  
+"Programming C#" doesn't compile as expected. However, the errormessage  
+given by mcs (version 0.11) is not correct as it doesn't indicate the  
+real problem of the code. The error I got was 
+./ex2-4.cs(5) error CS0103: The name `WriteLine' could not be found in  
+What I expected was something saying that using is only allowed with  
+namespaces and that Console is a class. 
+The code is as follows. 
+using System.Console; 
+class Hello { 
+    static void Main() { 
+        // Console from the System namespace 
+        WriteLine("Hello World"); 
+    }