[Mono-bugs] [Bug 34165][Blo] Changed - Incorrectly reporting CS0121: Ambiguous call when selecting function due to implicit casts
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
17 Nov 2002 15:54:06 -0000
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 martin@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=34165
--- shadow/34165 Sun Nov 17 10:47:30 2002
+++ shadow/34165.tmp.17509 Sun Nov 17 10:54:06 2002
@@ -45,6 +45,35 @@
------- Additional Comments From martin@ximian.com 2002-11-17 10:47 -------
Just committed a fix which fixes this particular testcase, but the one in corlib is still broken, so we need another testcase.
+
+------- Additional Comments From martin@ximian.com 2002-11-17 10:54 -------
+The new testcase:
+using System;
+
+class X
+{
+ X (long value)
+ {
+ Console.WriteLine ("Long");
+ }
+
+ X (X x)
+ {
+ Console.WriteLine ("X");
+ }
+
+ public static implicit operator X (long value)
+ {
+ return (new X (value));
+ }
+
+ static void Main ()
+ {
+ X x = new X (4);
+ }
+}
+
+