Bugzilla – Bug 317461
CS0034 not detected
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by marek.safar@seznam.cz 2005-03-15 04:56:50 MST ---- 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: ---- Additional Comments From duncan@ximian.com 2005-05-26 14:08:48 MST ---- I think this is a duplicate of 52492. *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO52492 *** Unknown operating system unknown. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"