[Mono-bugs] [Bug 29846][Nor] New - mcs fails to detect an unused local var (really simple test case)

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
3 Sep 2002 22:39:14 -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 gonzalo@ximian.com.

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

--- shadow/29846	Tue Sep  3 18:39:14 2002
+++ shadow/29846.tmp.6380	Tue Sep  3 18:39:14 2002
@@ -0,0 +1,36 @@
+Bug#: 29846
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs fails to detect an unused local var (really simple test case)
+
+Steps to reproduce the problem:
+1. Compile this one:
+using System;
+
+class C
+{
+	static void Main ()
+	{
+		string str;
+		Console.WriteLine (str.Trim ());
+	}
+}
+
+Actual Results:
+Compilation successful.
+
+Expected Results:
+case2.cs(8.22): error CS0165: Use of unassigned local variable 'str'.