a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
30 lines
354 B
C#
30 lines
354 B
C#
// Compiler options: -unsafe
|
|
|
|
//
|
|
// Checks for an implicit void * conversion during an
|
|
// explicit conversion
|
|
//
|
|
|
|
using System;
|
|
|
|
namespace IntPtr_Conv
|
|
{
|
|
struct FooStruct {
|
|
int x;
|
|
}
|
|
|
|
class Class1 {
|
|
|
|
public static int Main(string[] args)
|
|
{
|
|
IntPtr p = IntPtr.Zero;
|
|
|
|
unsafe {
|
|
FooStruct* s = (FooStruct*) (p);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
}
|
|
}
|