[Mono-bugs] [Bug 75656][Nor] New - CS0136 is not reported

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jul 28 04:34:54 EDT 2005


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 marek.safar at seznam.cz.

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

--- shadow/75656	2005-07-28 04:34:54.000000000 -0400
+++ shadow/75656.tmp.4119	2005-07-28 04:34:54.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 75656
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: marek.safar at seznam.cz               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CS0136 is not reported
+
+Description of Problem:
+
+No error is reported but I am not 100% sure whether it should be.
+
+
+Steps to reproduce the problem:
+1. 
+
+using System.Collections;
+
+class Symbol
+{
+}
+
+class X
+{
+		Symbol top;
+	
+		internal int Enter (Symbol key, object value)
+		{
+ 			if (key != null) {
+				top = key;					
+			}
+			Hashtable top = new Hashtable ();
+			return top.Count;
+		}
+		
+		public static void Main () {}
+}
+
+Actual Results:
+
+No error.
+
+Expected Results:
+
+csc reports;
+X.cs(19,14): error CS0136: A local variable named 'top' cannot be declared
+in this scope because it would give a different meaning to 'top', which is
+already used in a 'child' scope to denote something else
+
+How often does this happen? 
+
+
+Additional Information:


More information about the mono-bugs mailing list