[Mono-bugs] [Bug 70468][Nor] Changed - Constant value `-1' cannot be converted to System.IFormattable

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 30 Dec 2004 11:26:55 -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=70468

--- shadow/70468	2004-12-30 05:37:00.000000000 -0500
+++ shadow/70468.tmp.624	2004-12-30 11:26:55.000000000 -0500
@@ -46,6 +46,18 @@
 2004-12-30  Duncan Mak  <duncan@ximian.com>
 
 	* convert.cs: Fixed some typos and update some of the names.
 	(TryImplicitIntConversion): if target_type is IConvertible,
 	IComparable or IFormattable, return a BoxedCast instead of
 	failing. This fixes #70468.
+
+------- Additional Comments From bmaurer@users.sf.net  2004-12-30 11:26 -------
+You can't use typeof in mcs. The problem is that in corlib the typeof
+(foo) != typeof (foo) in the new mscorlib. These lookups are all done
+in typemanager.
+
+I would rather see something like:
+
+if (cast_type.IsAssignableFrom (const_type))
+
+In generics, there are going to be more interfaces like this, so it'd
+be nice to have a general solution.