[Mono-bugs] [Bug 71073][Wis] New - unfixable warning cs0067 "event not used"
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 6 Jan 2005 18:03:58 -0500 (EST)
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 danw@novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=71073
--- shadow/71073 2005-01-06 18:03:58.000000000 -0500
+++ shadow/71073.tmp.24089 2005-01-06 18:03:58.000000000 -0500
@@ -0,0 +1,43 @@
+Bug#: 71073
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: danw@novell.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: unfixable warning cs0067 "event not used"
+
+If an interface defines an event, and an implementation of that
+interface never invokes the event, mcs complains:
+
+ using System;
+
+ public interface IFoo {
+ event EventHandler blah;
+ }
+
+ public class Foo : IFoo {
+ public static void Main ()
+ {
+ ;
+ }
+
+ public event EventHandler blah;
+ }
+
+ danw@twelve-monkeys:tmp> mcs -o ev.exe ev.cs
+ ev.cs(13) warning CS0067: The event 'Foo.blah' is never used
+
+but if you don't define it, you get an error for not fully
+implementing the interface.
+
+The warning is consistent with csc, but it seems wrong.