summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0154-4.cs
blob: 1df9c631106b782ca76149c700bfbc1eb3e716bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// CS0154: The property or indexer `A.this[int]' cannot be used in this context because it lacks the `get' accessor
// Line: 18

public class A
{
	public int this[int i] { set { } }
}

public class B : A
{
	public int this[string i] { get { return 9; } }
}

class Test
{
	public static void Main ()
	{
		int i = new B ()[1];
	}
}