summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1540-12.cs
blob: 743ca561ac4df4e3c26d24ac124ef6f275da1acd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// CS1540: Cannot access protected member `A.Test.get' via a qualifier of type `B'. The qualifier must be of type `C' or derived from it
// Line: 17

class A
{
	public object[] Test {
		set { }
		protected get { return null; }
	}
}

class B : A
{
}

class C : A
{
	public void Test2 (B b)
	{
		foreach (object o in b.Test) {
		}
	}
}