[Mono-bugs] [Bug 52492][Wis] Changed - We do not detect CS0034 in the presence of implicit conversions

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 23 Dec 2003 13:24:39 -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=52492

--- shadow/52492	2003-12-23 13:20:19.000000000 -0500
+++ shadow/52492.tmp.3677	2003-12-23 13:24:39.000000000 -0500
@@ -1,14 +1,14 @@
 Bug#: 52492
 Product: Mono/Compilers
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: bmaurer@users.sf.net               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -37,6 +37,27 @@
 }
 
 csc gives
 
 t.cs(15,14): error CS0034: Operator '+' is ambiguous on operands of 
 type 'A' and 'A'
+
+------- Additional Comments From bmaurer@users.sf.net  2003-12-23 13:24 -------
+Related:
+
+This should give cs0035
+class A {
+	public static implicit operator double (A a)
+	{
+		return 0;
+	}
+
+	public static implicit operator decimal (A a)
+	{
+		return 0;
+	}
+
+	static void Main()
+	{
+		object o = - new A ();
+	}
+}