[Mono-bugs] [Bug 68711][Nor] Changed - mcs does not do conversions to/from decimal

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Sep 9 08:46:11 EDT 2005


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 skolima at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=68711

--- shadow/68711	2005-09-09 08:44:25.000000000 -0400
+++ shadow/68711.tmp.5499	2005-09-09 08:46:11.000000000 -0400
@@ -10,13 +10,12 @@
 Component: C#
 AssignedTo: duncan at ximian.com                            
 ReportedBy: dan at clevermachine.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
-Cc: 
 Summary: mcs does not do conversions to/from decimal
 
 Description of Problem:
 
 If I define a class C with an implicit operator to convert type X to type
 C, and type Y can implicitly cast to type X, attempting to implicitly cast
@@ -214,6 +213,19 @@
 implicit cast for an operator. CSCC checks only those returning a
 double, ignoring those providing a decimal. Try adding another
 implicit cast operator (to Decimal2) returning a double - CSCC will
 now compile the code, wheras it should now report a bug, because the
 code becames ambigious (there are 2 possible, equally specific
 implicit casts).
+
+------- Additional Comments From skolima at gmail.com  2005-09-09 08:46 -------
+I suggest reopening the bug. See my atachment : the code compiles and
+works under csc, but not under cscc (mono 1.1.8.2 / .3) or mcs
+(Portable .Net).
+
+Problem is, according to ECMA, the compiler should look for possible
+implicit cast for an operator. CSCC checks only those returning a
+double, ignoring those providing a decimal. Try adding another
+implicit cast operator (to Decimal2) returning a double - CSCC will
+now compile the code, wheras it should now report a bug, because the
+code becames ambigious (there are 2 possible, equally specific
+implicit casts).


More information about the mono-bugs mailing list