Bug 317026 (MONO71865) - [GMCS]: CS0067: The event is never used
Summary: [GMCS]: CS0067: The event is never used
Status: RESOLVED FIXED
Alias: MONO71865
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-27 19:16 UTC by José Faria
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 19:05:34 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".