Bug 323046 (MONO80357) - [GMCS] Invalid CS0169 in generic class
Summary: [GMCS] Invalid CS0169 in generic class
Status: RESOLVED FIXED
Alias: MONO80357
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.2
Hardware: Other All
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-25 21:10 UTC by Gert Driesen
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:20:45 UTC


---- Reported by gert.driesen@pandora.be 2006-12-25 14:10:10 MST ----

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



---- Additional Comments From martin@ximian.com 2007-04-10 13:58:51 MST ----

Fixed in SVN.