summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0151.cs
blob: 7fc40a5f24e3d3d4d2f799c3661b69aaf28bdd76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// CS0151: A switch expression of type `Y' cannot be converted to an integral type, bool, char, string, enum or nullable type
// Line: 13

class Y {
	byte b;
}

class X {
	static void Main ()
	{
		Y y = new Y ();

		switch (y){
		case 0:
			break;
		case 1:
			break;
		}
	}
}