[Mono-bugs] [Bug 23498] New - op_Explicit() is using the byte version where int is needed
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
16 Apr 2002 16:08:43 -0000
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 ndrochak@gol.com.
http://bugzilla.ximian.com/show_bug.cgi?id=23498
--- shadow/23498 Tue Apr 16 12:08:43 2002
+++ shadow/23498.tmp.13270 Tue Apr 16 12:08:43 2002
@@ -0,0 +1,37 @@
+Bug#: 23498
+Product: Mono/Runtime
+Version: unspecified
+OS:
+OS Details: RedHat 7.2
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ndrochak@gol.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: op_Explicit() is using the byte version where int is needed
+
+This code throws an OverFlow exception when it shouldn't. The runtime
+seems to be choosing the byte explicit converter instead of the int
+version:
+
+namespace NS {
+ class C {
+ public static int Main() {
+ decimal d = -1m;
+ int i = (int)d;
+ bool b = (i == -1);
+ if (b)
+ return 0;
+ else
+ return 1;
+ }
+
+ }
+
+}