Bug 317461 (MONO73709) - CS0034 not detected
Summary: CS0034 not detected
Status: RESOLVED MOVED
Alias: MONO73709
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-15 11:56 UTC by Marek Safar
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:10:46 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"