summaryrefslogtreecommitdiff
path: root/mcs/tests/test-815.cs
blob: 3dbc1f8077c9dfb02ccde5f76bfd195835c9b16b (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
using System.Runtime.CompilerServices;

interface IS
{
	[IndexerName ("Hello")]
	int this[int index] { get; }
}

class D : IS
{
	[IndexerName ("DUUU")]
	public int this[int index] {
		get {
			return 1;
		}
	}
}

static class X
{
	public static int Main ()
	{
		IS a = new D ();
		int r = a[1];

		D d = new D ();
		r = d[2];

		return 0;
	}
}