Author: miguel
Date: 2005-06-28 18:53:58 -0400 (Tue, 28 Jun 2005)
New Revision: 46679
Added:
trunk/mcs/tests/test-421.cs
Log:
Add
Added: trunk/mcs/tests/test-421.cs
===================================================================
--- trunk/mcs/tests/test-421.cs 2005-06-28 22:40:40 UTC (rev 46678)
+++ trunk/mcs/tests/test-421.cs 2005-06-28 22:53:58 UTC (rev 46679)
@@ -0,0 +1,43 @@
+
+// Test case from bug 75270
+
+using System;
+
+public interface I {
+ void SetObject (string foo);
+}
+
+public class A {
+ public virtual void SetObject (string foo) {
+ Console.WriteLine ("A.SetObject {0}", foo);
+ }
+}
+
+public class B : A, I {
+ //public override void SetObject (string foo) {
+ //Console.WriteLine ("B.SetObject {0}", foo);
+ //}
+}
+
+public class C : B {
+ public static book ok = false;
+ public override void SetObject (string foo) {
+ Console.WriteLine ("C.SetObject {0}", foo);
+ ok = true;
+ }
+}
+
+
+public class X {
+ public static int Main (string[] args) {
+ I i = new C();
+
+ // Tests that C.SetObject is called here
+ i.SetObject ("hi");
+ C c = (C) i;
+ if (!c.ok)
+ return 1;
+ return 1;
+ }
+}
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches