[Mono-bugs] [Bug 54928][Cos] Changed - implicit operator cannot convert from struct to decimal
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 27 Feb 2004 11:40:46 -0500 (EST)
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=54928
--- shadow/54928 2004-02-27 08:19:55.000000000 -0500
+++ shadow/54928.tmp.9295 2004-02-27 11:40:46.000000000 -0500
@@ -1,14 +1,14 @@
Bug#: 54928
Product: Mono/Compilers
Version: unspecified
-OS:
+OS: unknown
OS Details: Win2K
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Cosmetic
Component: C#
AssignedTo: mono-bugs@ximian.com
ReportedBy: yoonkit@yahoo.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -68,6 +68,34 @@
I havent tried for other datatypes...
e.g. int -> decimal, double -> decimal, etc.
Regards,
Yoon Kit.
+
+------- Additional Comments From bmaurer@users.sf.net 2004-02-27 11:40 -------
+A user-defined implicit conversion from type S to type T is processed
+as follows:
+...
+Find the set of types, D, from which user-defined conversion
+operators will be considered....
+
+Find the set of applicable user-defined conversion operators, U. This
+set consists of the user-defined implicit conversion operators
+declared by the classes or structs in D that convert from a type
+encompassing S to a type encompassed by T.
+...
+Find the most specific source type, SX, of the operators in U: ...
+Find the most specific target type, TX, of the operators in U: ...
+
+[if U has > 1 op], the user-defined conversion is applied:
+If S is not SX, then a standard implicit conversion from S to SX is
+performed.
+The most specific user-defined conversion operator is invoked to
+convert from SX to TX.
+If TX is not T, then a standard implicit conversion from TX to T is
+performed.
+
+So, we are missing the "if TX is not T" clause. I think the "S is not
+SX" is already covered because the source always has to be either S
+or a parent class of S. I am pretty sure we already cover this
+situation. However, TX -> T could be *any* implict conversion.