Initial set of Ward sgen annotations (#5705)
[mono.git] / mcs / tests / test-421.cs
1
2 // Test case from bug 75270
3
4 using System;
5
6 public interface I {
7   void SetObject (string foo);
8 }
9
10 public class A {
11   public virtual void SetObject (string foo) {
12     Console.WriteLine ("A.SetObject {0}", foo);
13   }
14 }
15
16 public class B : A, I {
17   //public override void SetObject (string foo) {
18   //Console.WriteLine ("B.SetObject {0}", foo);
19   //}
20 }
21
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;
27   }
28 }
29
30
31 public class X {
32   public static int Main (string[] args) {
33     I i = new C();
34
35     // Tests that C.SetObject is called here
36     i.SetObject ("hi");
37     if (!C.ok)
38         return 1;
39     return 0;
40   }
41 }
42