[Mono-bugs] [Bug 78416][Wis] New - [GMCS] Compile error on code
that is incorrect which csc compiles
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue May 16 07:51:29 EDT 2006
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 adrinael at adrinael.net.
http://bugzilla.ximian.com/show_bug.cgi?id=78416
--- shadow/78416 2006-05-16 07:51:28.000000000 -0400
+++ shadow/78416.tmp.15787 2006-05-16 07:51:28.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 78416
+Product: Mono: Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: adrinael at adrinael.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS] Compile error on code that is incorrect which csc compiles
+
+Description of Problem:
+
+The following little code snippet
+
+object d;
+object q;
+
+...
+
+q = (double?)((decimal) d);
+
+produces an error "cannot convert from decimal to double?" on gmcs, csc
+compiles it.
+
+From the standard:
+
+"For these reasons, no implicit conversions exist between the floating
+point types and decimal"
+" -- an implicit conversion exists from any non-nullable value type to a
+nullable form of that type"
+
+Strictly said, that makes (double?)decimalvalue an error _if_ the
+conversion needs to convert to double first.
+
+gmcs seems to be correct, this is only a "differs from csc" bugreport.
More information about the mono-bugs
mailing list