Bugzilla – Bug 317026
[GMCS]: CS0067: The event is never used
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by spigaz@gmail.com 2005-01-27 12:16:22 MST ---- Description of Problem: gmcs reportes wrongly that an event variable isn't used. Steps to reproduce the problem: 1. Insert into a file: namespace FLMID.Bugs.EventOne { public delegate void Changed<T>(A<T> a); public class A<T> { protected event Changed<T> _changed; public void Register(Changed<T> changed) { _changed += changed; _changed(this); } } public class Test { public static void Main(string[] args) { A<int> a = new A<int>(); a.Register(new Changed<int>(Del)); } public static void Del(A<int> a) { System.Console.WriteLine("Solved"); } } } 2. try to compile it 3. Actual Results: /projects/FLMID/Bugs/EventOne/src/Test.cs(8) error CS0067: The event 'FLMID.Bugs.EventOne.A`1._changed' is never used Expected Results: Solved How often does this happen? always Additional Information: It works fine on .Net 2.0 ---- Additional Comments From martin@ximian.com 2005-05-04 09:38:25 MST ---- Fixed in SVN. This bug blocked bug(s) 71866. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Gentoo 2.6.10</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".