[Mono-bugs] [Bug 77545][Wis] New - GMCS bad warning CS0414
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Feb 13 17:05:19 EST 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 adam.lofts at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77545
--- shadow/77545 2006-02-13 17:05:19.000000000 -0500
+++ shadow/77545.tmp.3707 2006-02-13 17:05:19.000000000 -0500
@@ -0,0 +1,55 @@
+Bug#: 77545
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: adam.lofts at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: GMCS bad warning CS0414
+
+This code
+
+using System;
+using System.Collections.Generic;
+
+public class A <T>
+{
+ T obj;
+
+ public A (T obj)
+ {
+ this.obj = obj;
+ }
+
+ override public string ToString ()
+ {
+ return obj.ToString ();
+ }
+}
+
+public class MyClass
+{
+ public static void Main (string [] args)
+ {
+ A <string> a = new A <string> ("hello");
+ Console.WriteLine (a);
+ }
+}
+
+give a compiler warning:
+
+gmcs Test.cs -out:Test.exe
+Test.cs(6,4): warning CS0414: The private field `A<T>.obj' is assigned but
+its value is never used
+
+gmcs --version
+Mono C# compiler version 1.1.13.2
More information about the mono-bugs
mailing list