projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Remove redundant file from Java build
[mono.git]
/
mcs
/
errors
/
cs0151-2.cs
1
// cs0151-2.cs: A value of an integral type or string expected for switch
2
// Line: 12
3
4
class Y {
5
byte b;
6
7
public static implicit operator int (Y i)
8
{
9
return i.b;
10
}
11
12
public static implicit operator byte (Y i)
13
{
14
return i.b;
15
}
16
17
public Y (byte b)
18
{
19
this.b = b;
20
}
21
}
22
23
class X {
24
static void Main ()
25
{
26
Y y = new Y (1);
27
28
switch (y){
29
case 0:
30
break;
31
case 1:
32
break;
33
}
34
35
int a = y;
36
}
37
}