[Mono-bugs] [Bug 73709][Nor] New - CS0034 not detected
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 15 Mar 2005 04:56:50 -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 marek.safar@seznam.cz.
http://bugzilla.ximian.com/show_bug.cgi?id=73709
--- shadow/73709 2005-03-15 04:56:50.000000000 -0500
+++ shadow/73709.tmp.9424 2005-03-15 04:56:50.000000000 -0500
@@ -0,0 +1,73 @@
+Bug#: 73709
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: marek.safar@seznam.cz
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: CS0034 not detected
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+public class Y {
+ public static implicit operator int (Y y) {
+ return 0;
+ }
+
+ public static implicit operator string (Y y) {
+ return null;
+ }
+
+ public static implicit operator Y (string y) {
+ return null;
+ }
+
+ public static implicit operator Y (int y) {
+ return null;
+ }
+}
+
+public class X {
+ public static implicit operator int (X x) {
+ return 0;
+ }
+
+ public static implicit operator string (X x) {
+ return null;
+ }
+}
+
+public class C {
+ public static void Main ()
+ {
+ Y y = new Y () + new X ();
+ }
+}
+
+Actual Results:
+
+No error
+
+
+Expected Results:
+
+??.cs(32,9): error CS0034: Operator '+' is ambiguous on operands of type
+ 'Y' and 'X'
+
+
+How often does this happen?
+
+
+Additional Information: