[Mono-bugs] [Bug 79165][Nor] New - CS1041 is not reported for invalid use of keyword

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 25 13:43:26 EDT 2006


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 gert.driesen at pandora.be.

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

--- shadow/79165	2006-08-25 13:43:26.000000000 -0400
+++ shadow/79165.tmp.23803	2006-08-25 13:43:26.000000000 -0400
@@ -0,0 +1,40 @@
+Bug#: 79165
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CS1041 is not reported for invalid use of keyword
+
+mcs and gmcs do not report CS1041 if a keyword is used for an identifier.
+
+To reproduce, compile the following code snippet:
+
+public class Test {
+	static void Main () {
+		string ref = "abc";
+		Console.WriteLine (ref);
+	}
+}
+
+Expected result:
+
+test.cs(3,10): error CS1041: Identifier expected, 'ref' is a keyword
+test.cs(3,10): error CS1525: Invalid expression term 'ref'
+test.cs(4,25): error CS1525: Invalid expression term ')'
+test.cs(4,26): error CS1026: ) expected
+
+Actual result:
+
+test.cs(3,10): error CS1002: Expecting ';'
+test.cs(4,25): error CS1002: Expecting ';'


More information about the mono-bugs mailing list