repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
In ilasm/tests:
[mcs.git]
/
tests
/
test-171.cs
blob
21fc85915a4cf5b00530e4d15f1238aa6f00ac64
1
// Compiler options: -unsafe
2
3
//
4
// Checks for an implicit void * conversion during an
5
// explicit conversion
6
//
7
8
using
System
;
9
10
namespace
IntPtr_Conv
11
{
12
struct
FooStruct
{
13
int
x
;
14
}
15
16
class
Class1
{
17
18
static int
Main
(
string
[]
args
)
19
{
20
IntPtr p
=
IntPtr
.
Zero
;
21
22
unsafe
{
23
FooStruct
*
s
= (
FooStruct
*) (
p
);
24
}
25
26
return
0
;
27
}
28
}
29
}