summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0122-16.cs
blob: cdcfb75d034428fde68b6cff61fa04d557465681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// CS0122: `A.x' is inaccessible due to its protection level
// Line: 16

public class A
{
	protected bool x = true;
	
	public A()
	{}
}

public class B
{
	public static void Main(string[] args)
	{
		if (new A().x)
		{
			System.Console.WriteLine("this should not compile");
		}
	}
}