[Mono-bugs] [Bug 81544][Nor] New - CS0067 not reported when event is never used

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon May 7 06:46:28 EDT 2007


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=81544

--- shadow/81544	2007-05-07 06:46:28.000000000 -0400
+++ shadow/81544.tmp.27492	2007-05-07 06:46:28.000000000 -0400
@@ -0,0 +1,34 @@
+Bug#: 81544
+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: CS0067 not reported when event is never used
+
+(g)mcs does not report CS0067 when an event is never actually raised.
+
+To reproduce, compile the following code snippet (with 
+mcs /target:library /warn:4 test.cs):
+
+public class Test
+{
+	public delegate void TestDelegate (object sender, int value);
+	public virtual event TestDelegate TestEvent;
+}
+
+Expected result:
+test.cs(4,36): warning CS0067: The event 'Test.TestEvent' is never used
+
+Actual result:
+No warning


More information about the mono-bugs mailing list