codeowners update
[mono.git] / mcs / tests / test-724.cs
1 public class Test
2 {
3         private static int DoTest (string type, string expected, string actual, int failcode)
4         {
5                 if (!actual.Equals (expected)) {
6                         System.Console.WriteLine ("Bad {0}: Expected {1}, Was {2}",
7                                                            type, expected, actual);
8                         return failcode;
9                 }
10                 return 0;
11         }
12
13         public static int Main ()
14         {
15                 int failure = 0;
16                 Concrete val = new Concrete ();
17
18                 failure |= DoTest ("A", "A", ((A) val).Spec, 0x01);
19                 failure |= DoTest ("B", "B", ((B) val).Spec, 0x02);
20                 failure |= DoTest ("C", "B", ((C) val).Spec, 0x04);
21                 failure |= DoTest ("Concrete", "Concrete", val.Spec, 0x08);
22
23                 return failure;
24         }
25 }
26
27 interface A
28 {
29         string Spec { get; }
30 }
31
32 interface B : A
33 {
34         new string Spec { get; }
35 }
36
37 interface C : B
38 {
39 }
40
41 class Concrete : C
42 {
43         string A.Spec { get { return "A"; } }
44         string B.Spec { get { return "B"; } }
45         public string Spec { get { return "Concrete"; } }
46 }