New test.
[mono.git] / mcs / tests / test-526.cs
1 using System;
2
3 interface IList \r
4 {
5         int Count ();
6 }
7
8 interface ICounter \r
9 {
10         int Count { set; }\r
11 }
12
13 interface IListCounter: IList, ICounter\r
14 {\r
15 }\r
16 \r
17 interface IA\r
18 {\r
19         int Value ();\r
20 }\r
21 \r
22 interface IB : IA\r
23 {\r
24         new int Value { get; }\r
25 }\r
26 \r
27 interface IC : IB\r
28 {\r
29         new int Value { get; }\r
30 }\r
31 \r
32 interface IBB : IList, ICounter\r
33 {\r
34 }\r
35 \r
36 interface ICC : IBB\r
37 {\r
38 }\r
39 \r
40 interface IM1\r
41 {\r
42     void Add (int arg);\r
43 }\r
44 \r
45 interface IM2 : IM1\r
46 {\r
47     int Add (int arg, bool now);\r
48 }
49
50 class Test\r
51 {\r
52         static void Main ()\r
53         {\r
54         }\r
55         
56         static void Foo (IListCounter t)
57         {
58                 t.Count ();
59         }\r
60         \r
61         void Foo2 (IC b)\r
62         {\r
63                 int i = b.Value;\r
64         }\r
65         \r
66         void Foo3 (ICC c)\r
67         {\r
68                 c.Count ();\r
69         }\r
70     \r
71         void Foo4 (IM2 im2)\r
72         {\r
73                 im2.Add (2);\r
74         }
75
76 }