summaryrefslogtreecommitdiff
path: root/mcs/errors/cs1540-6.cs
blob: 484a78c186550225360427085a20c407d612321b (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
// CS1540: Cannot access protected member `A.A(A)' via a qualifier of type `A'. The qualifier must be of type `B' or derived from it
// Line: 25

public class A {
	public A ()
	{
	}

	protected A (A a)
	{
	}
}

public class B : A {
	public B () : base ()
	{
	}
	
	public B (A a) : base (a)
	{
	}
	
	public A MyA {
		get {
			A a = new A (this);
			return a;
		}
	}
}