Merge pull request #3209 from tritao/master
[mono-project.git] / mcs / tests / test-776.cs
blob3c5b1152566d7527a5a893660f83b944fe5316e5
1 using System;
3 class First
5 public virtual object this [string name]
7 get { return "First"; }
8 set { }
12 class Second : First
14 public override object this [string name]
16 get { return "Second"; }
17 set { }
21 class Third : Second
23 public override object this [string name]
25 get { return base [name]; }
26 set { }
30 class a
32 public static int Main (string[] args)
34 First t = (First)new Third ();
35 if (t ["test"] != "Second")
36 return 1;
38 return 0;