[Mono-bugs] [Bug 27288][Maj] New - Interface explicit implementation

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
1 Jul 2002 12:17:14 -0000


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 jaime@geneura.ugr.es.

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

--- shadow/27288	Mon Jul  1 08:17:14 2002
+++ shadow/27288.tmp.16483	Mon Jul  1 08:17:14 2002
@@ -0,0 +1,73 @@
+Bug#: 27288
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details: Red Hat 7.3
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jaime@geneura.ugr.es               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Interface explicit implementation
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+> Hi again hackers,
+> 
+> I've noticed I can explicitly implement an interface method as virtual
+> and I've read that it's not legal. Is that a bug in the mcs?.
+> 
+> I mean, f.ex:
+> 
+> interface IMailAgent
+> {
+>       void Send(object obj);
+>       ...
+> }
+> 
+> ...
+> 
+> public class GroupWare : IPhoneable, IMailAgent, I...
+> {
+>       public virtual void IMailAgent.Send(object obj)  // I can
+>       {                                                // compile this
+>               ...
+>       }
+> 
+>       ...
+> }
+> 
+> What I've read is that that I can't mark a method as virtual 
+> if it's an 
+> explicit implementation of an interface method. Actually I can do that
+> with mcs.
+
+
+Steps to reproduce the problem:
+1. Try to explicitly implement an interface method using the virtual modifier.
+ 
+
+Actual Results:
+I can do that.
+
+Expected Results:
+It's not legal to use access modifiers (public/protected etc..) or any of
+abstract, 
+virtual, override, or static modifiers either.
+
+
+How often does this happen? 
+Always.
+
+Additional Information:
+More on mono-list.
+
+Ask me for testing code to see this bug and I will mail you it.