[Mono-bugs] [Bug 29494][Min] New - mcs doesn't report 'missing semicolon'

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
27 Aug 2002 08:29:48 -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 ndrochak@gol.com.

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

--- shadow/29494	Tue Aug 27 04:29:48 2002
+++ shadow/29494.tmp.5469	Tue Aug 27 04:29:48 2002
@@ -0,0 +1,63 @@
+Bug#: 29494
+Product: Mono/MCS
+Version: unspecified
+OS: Red Hat 7.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ndrochak@gol.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs doesn't report 'missing semicolon'
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+mcs doesn't notice and/or report the missing semicolon in the following example
+
+Steps to reproduce the problem:
+using System;
+
+class Class1
+{
+	static int Main(string[] args)
+	{
+		string parse_me = "9999999999999999999999";
+		int len = parse_me.Length;
+		long val = 0;
+		char c;
+		
+		for (int i = 0; i < len; i++){
+			c = parse_me [i];
+
+			if (c >= '0' && c <= '9'){
+				Console.WriteLine("test")
+				val = checked (val * 10 + (c - '0'));
+			}
+		}
+		return 1;
+	}
+}
+
+Actual Results:
+simpTest.cs(17) error CS-0001: Invalid Type definition
+simpTest.cs(17) error CS0136: A local variable named `val' cannot be
+declared in this scope since it would give a different meaning to `val',
+which is already used in a `parent or current' scope to denote something else
+Compilation failed: 2 error(s), 0 warnings
+
+Expected Results:
+Should report missing semicolon on line 16
+
+How often does this happen? 
+always
+
+Additional Information:
+This doesn't happen with a missing semicolon everwhere, but I'm not sure
+what about this example makes it happen.  The for loop?