summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0649-5.cs
blob: 20778691b1e98763eeaa3bd6a23615deaa257767 (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
// CS0649: Field `TestClass.b' is never assigned to, and will always have its default value
// Line: 12
// Compiler options: -warnaserror -warn:4

public struct Bar
{
	public int x;
}

public class TestClass
{
	Bar b;

	public bool Foo ()
	{
		if (b.x == 0)
			return false;

		return true;
	}

	public static void Main ()
	{
	}
}