Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-776.cs
1 using System;
2
3 class First
4 {
5         public virtual object this [string name]
6         {
7                 get { return "First"; }
8                 set { }
9         }
10 }
11
12 class Second : First
13 {
14         public override object this [string name]
15         {
16                 get { return "Second"; }
17                 set { }
18         }
19 }
20
21 class Third : Second
22 {
23         public override object this [string name]
24         {
25                 get { return base [name]; }
26                 set { }
27         }
28 }
29
30 class a
31 {
32         public static int Main (string[] args)
33         {
34                 First t = (First)new Third ();
35                 if (t ["test"] != "Second")
36                         return 1;
37                 
38                 return 0;
39         }
40 }