[Mono-bugs] [Bug 76122][Nor] New - Events in base class are not seen for interface in extending class

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Sep 16 12:31:50 EDT 2005


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 d.moonfire at mfgames.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76122

--- shadow/76122	2005-09-16 12:31:49.000000000 -0400
+++ shadow/76122.tmp.25252	2005-09-16 12:31:49.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 76122
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: d.moonfire at mfgames.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Events in base class are not seen for interface in extending class
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+If you have an interface that requires an event, create a base class that
+does not extend that interface but implements the event, then create a
+class that extends both the interface and base class does not see the event
+for purposes of fulfilling the interface requirements.
+
+
+Steps to reproduce the problem:
+1. Enter the following code:
+
+public delegate void DelegateHandler();
+
+public interface EventInterface
+{
+  event DelegateHandler OnEvent;
+}
+
+public class BaseClass
+{
+  public event DelegateHandler OnEvent;
+}
+
+public class ExtendingClass : BaseClass, EventInterface
+{
+  public static void Main()
+  {
+  }
+}
+
+2. Compile it: mcs Filename.cs
+3. View the pretty errors.
+
+Actual Results:
+EventBug.cs(13) error CS0535: 'ExtendingClass' does not implement interface
+member 'EventInterface.add_OnEvent[ DelegateHandler]'
+EventBug.cs(5): 'add_OnEvent' (name of symbol related to previous error
+EventBug.cs(13) error CS0535: 'ExtendingClass' does not implement interface
+member 'EventInterface.remove_OnEvent[ DelegateHandler]'
+EventBug.cs(5): 'remove_OnEvent' (name of symbol related to previous error
+Compilation failed: 2 error(s), 0 warnings
+
+
+Expected Results:
+It should compile and work.
+
+How often does this happen? 
+N (Always)
+
+Additional Information:


More information about the mono-bugs mailing list