[Mono-bugs] [Bug 39665][Min] Changed - MCS error with types

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 27 Mar 2003 18:55:52 -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 miguel@ximian.com.

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

--- shadow/39665	Thu Mar 13 12:52:39 2003
+++ shadow/39665.tmp.5394	Thu Mar 27 18:55:52 2003
@@ -1,14 +1,14 @@
 Bug#: 39665
 Product: Mono/MCS
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Minor
 Component: Misc
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: crichton@gimp.org               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -104,6 +104,35 @@
     }
 ---
 with the following error:
 
 XmlRpcDouble.cs(59) error CS0029: Cannot convert implicitly from
 `CookComputing.XmlRpc.XmlRpcBoolean' to `bool'
+
+------- Additional Comments From miguel@ximian.com  2003-03-27 18:55 -------
+This sample is self-contained and exhibits the problem:
+
+  public class XmlRpcBoolean
+  {
+    public static implicit operator bool (XmlRpcBoolean x)
+    {
+	    return true;
+    }
+  }
+
+class X {
+	static bool XX ()
+	{
+		object o = null;
+		
+		return new XmlRpcBoolean();
+		return true;
+	}
+
+	static void Main ()
+	{
+	}
+}
+
+The problem we have is that we are picking op_True instead of
+op_Implicit.  I have to review when `operator true' and `operator
+false' are used as opposed to hard-coding it in GetConversionOperators