repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[sgen] Don't trigger collections during allocation of thread objects (#17970)
[mono-project.git]
/
mcs
/
errors
/
cs0151-5.cs
blob
3995a28675590669e3351cdb9bc70a91cb191dc6
1
// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type
2
// Line: 19
3
4
struct
X
5
{
6
public static implicit operator int
? (
X x
)
7
{
8
return
1
;
9
}
10
11
static void
Main
()
12
{
13
X
?
x
=
null
;
14
switch
(
x
) {
15
default
:
16
break
;
17
}
18
}
19
}