[Mono-bugs] [Bug 75726][Nor] New - CS0535 is not reported when base class explicitly implements interface with same members

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Aug 6 01:58:10 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 gert.driesen at pandora.be.

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

--- shadow/75726	2005-08-06 01:58:10.000000000 -0400
+++ shadow/75726.tmp.31447	2005-08-06 01:58:10.000000000 -0400
@@ -0,0 +1,52 @@
+Bug#: 75726
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CS0535 is not reported when base class explicitly implements interface with same members
+
+When interfaces share the same member signature, and a certain class (B) 
+implements an interface (ITest2) while its base class (A) explicitly 
+implements another interface (ITest1) with the same member signature, 
+then mcs does not report CS0535 if the derived class does not actually 
+provide an implementation for the interface it implements (ITest2).
+
+To reproduce this issue, compile the following code snippet (using 
+mcs /target:library):
+
+public interface ITest1 {
+	void GetName(string id);
+}
+
+public interface ITest2 {
+	void GetName(string id);
+}
+
+public class A : ITest1 {
+	void ITest1.GetName(string id) {
+	}
+}
+
+public class B : A, ITest2 {
+}
+
+Actual result:
+
+Successful compilation.
+
+Expected result:
+
+test.cs(14,14): error CS0535: 'B' does not implement interface 
+member 'ITest2.GetName(string)'
+test.cs(6,7): (Location of symbol related to previous error)


More information about the mono-bugs mailing list