[Mono-bugs] [Bug 48711][Min] New - MCS 0.26 warning CS0169 and CS0219 incorrect
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 22 Sep 2003 13:48:03 -0400 (EDT)
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 2ligkjk02@sneakemail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=48711
--- shadow/48711 2003-09-22 13:48:03.000000000 -0400
+++ shadow/48711.tmp.29401 2003-09-22 13:48:03.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 48711
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details: XP
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: 2ligkjk02@sneakemail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MCS 0.26 warning CS0169 and CS0219 incorrect
+
+Description of Problem:
+MCS 0.26.42336.0 gives warnings CS0169 and CS0219 while neither version
+of CSC does.
+
+Steps to reproduce the problem:
+1. Create file internal.cs with contents at end of this report
+2. Execute mcs /warn:4 internal.cs
+
+Actual Results:
+internal.cs(5) warning CS0169: Private field `cls.s' is never used
+internal.cs(11) warning CS0219: The variable `c' is assigned but its
+value is never used
+Compilation succeeded - 2 warning(s)
+
+Expected Results:
+No warnings.
+
+How often does this happen?
+Constistently.
+
+Additional Information:
+internal.cs file contents:
+
+using System;
+
+class cls
+{
+ internal string s;
+}
+class MonoEmbed
+{
+ static void Main()
+ {
+ cls c = new cls();
+ c.s = "test";
+ UseIt( c );
+ }
+ static void UseIt( cls c )
+ {
+ Console.WriteLine( c.s );
+ }
+}