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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +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. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
