[Mono-bugs] [Bug 75903][Nor] New - Inccorect method called with interface inheritance

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 25 03:20:47 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 krylovbv at mail.ru.

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

--- shadow/75903	2005-08-25 03:20:47.000000000 -0400
+++ shadow/75903.tmp.28797	2005-08-25 03:20:47.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 75903
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: JIT
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: krylovbv at mail.ru               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Inccorect method called with interface inheritance
+
+Description of Problem:
+Incorrect method calls throth interface if inheritance present.
+
+Steps to reproduce the problem:
+1. Declare sach class hierarhy
+
+public interface IBase {
+	void Do();
+}
+
+public interface IDerived : IBase {
+}
+
+public class Base : IBase {
+	void IBase.Do() {
+		Console.Write("IBase.Do");
+		Do();
+	}
+	protected virtual void Do() {
+		Console.Write("Do");
+	}
+}
+
+public class Derived : Base, IDerived {
+}
+
+2. Exec folloing code
+	IDerived d = new Derived();
+	d.Do();
+
+Actual Results:
+
+Do
+
+Expected Results:
+
+IBase.Do
+Do
+
+Additional Information:
+
+if remove virtual from "protected virtual void Do()" everithing gows fine.


More information about the mono-bugs mailing list