summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1540-11.cs
blob: 1443179bd858aebde560ba8bb46a3453d1c65753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// CS1540: Cannot access protected member `A.this[int]' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it
// Line: 14

class A {
	protected int this [int i] { get { return i; } }
}

class B : A { }

class C : A {
	static int Main ()
	{
		B b = new B ();
		return b [0];
	}
}