2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
[mcs.git] / tests / test-421.cs
blob0466e6cf80077d6e238b7207d556c102245aa786
2 // Test case from bug 75270
4 using System;
6 public interface I {
7 void SetObject (string foo);
10 public class A {
11 public virtual void SetObject (string foo) {
12 Console.WriteLine ("A.SetObject {0}", foo);
16 public class B : A, I {
17 //public override void SetObject (string foo) {
18 //Console.WriteLine ("B.SetObject {0}", foo);
19 //}
22 public class C : B {
23 public static bool ok = false;
24 public override void SetObject (string foo) {
25 Console.WriteLine ("C.SetObject {0}", foo);
26 ok = true;
31 public class X {
32 public static int Main (string[] args) {
33 I i = new C();
35 // Tests that C.SetObject is called here
36 i.SetObject ("hi");
37 if (!C.ok)
38 return 1;
39 return 0;