[Mono-bugs] [Bug 80357][Nor] New - Invalid CS0169 in generic class

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Dec 25 14:10:11 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 gert.driesen at pandora.be.

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

--- shadow/80357	2006-12-25 14:10:11.000000000 -0500
+++ shadow/80357.tmp.3011	2006-12-25 14:10:11.000000000 -0500
@@ -0,0 +1,54 @@
+Bug#: 80357
+Product: Mono: Compilers
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Invalid CS0169 in generic class
+
+gmcs currently mistakenly reports CS0169 even if a method is used as 
+delegate in a generic class.
+
+To reproduce, compile the following using gmcs:
+
+using System;
+
+public class Test
+{
+  static void Main ()
+  {
+  }
+}
+
+public class A<T>
+{
+  public event EventHandler<EventArgs> KeyPress;
+
+  public A ()
+  {
+    KeyPress += new EventHandler<EventArgs> (ListView_KeyPress);
+  }
+
+  private void ListView_KeyPress (object sender, EventArgs e)
+  {
+  }
+}
+
+Actual result:
+
+test.cs(20,15): warning CS0169: The private method 'A<T>.ListView_KeyPress
+(object, System.EventArgs)' is never used
+
+Expected result:
+
+no warning


More information about the mono-bugs mailing list