2 // Test for conversions that were supposed to be explicit operator
3 // conversions on UIntPtr and IntPtr, but due to historical reasons
4 // ended up in the CSC compiler.
6 // See bug http://bugzilla.ximian.com/show_bug.cgi?id=59800 for details
8 // The conversions are:
20 public static void Main ()
22 UIntPtr a
= (UIntPtr
) 1;
25 sbyte _sbyte
= (sbyte) a
;
26 short _short
= (short) a
;
30 IntPtr _intptr
= (IntPtr
) 1;
31 ulong _ulong
= (ulong) _intptr
;
34 UIntPtr _uptr
= (UIntPtr
) _sbyte
;
35 _uptr
= (UIntPtr
) _short
;
36 _uptr
= (UIntPtr
) _int
;
39 static void Compile ()
41 IntPtr a
= (IntPtr
) 1;
45 static void M (long l
){}
46 static void M (UInt64 l
){}
47 static void M (object o
){}