Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-776.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3c5b1152566d7527a5a893660f83b944fe5316e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;

class First
{
	public virtual object this [string name]
	{
		get { return "First"; }
		set { }
	}
}

class Second : First
{
	public override object this [string name]
	{
		get { return "Second"; }
		set { }
	}
}

class Third : Second
{
	public override object this [string name]
	{
		get { return base [name]; }
		set { }
	}
}

class a
{
	public static int Main (string[] args)
	{
		First t = (First)new Third ();
		if (t ["test"] != "Second")
			return 1;
		
		return 0;
	}
}