[Mono-bugs] [Bug 59800][Nor] Changed - error compiling cast from ulong to IntPtr
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 9 Jun 2004 11:52:33 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=59800
--- shadow/59800 2004-06-09 10:59:20.000000000 -0400
+++ shadow/59800.tmp.32012 2004-06-09 11:52:33.000000000 -0400
@@ -26,6 +26,25 @@
------- Additional Comments From bmaurer@users.sf.net 2004-06-09 10:59 -------
Interesting. There are no implicit conversions defined from ulong to
IntPtr.
I have no idea why csc compiles this.
+
+------- Additional Comments From bmaurer@users.sf.net 2004-06-09 11:52 -------
+csc will *not* compile:
+
+class T {
+ static void Main () {
+ ulong ul = 0;
+ X x = (X) ul;
+ }
+}
+
+public struct X {
+ public static explicit operator X (long value)
+ {
+ return new X ();
+ }
+}
+
+Is this a csc bug?