summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0236.cs
blob: 297a7a73aba42433a32be682b4cc60f4ebdc36de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// CS0236: A field initializer cannot reference the nonstatic field, method, or property `X.Foo'
// Line: 12

class X
{
	int Foo {
		get {
			return 9;
		}
	}

	long Bar = Foo;

	static void Main () {
	}
}