[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
Wed, 15 Dec 2004 04:02:37 -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 rharinath@novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=70468
--- shadow/70468 2004-12-11 16:52:27.000000000 -0500
+++ shadow/70468.tmp.6449 2004-12-15 04:02:37.000000000 -0500
@@ -1,22 +1,21 @@
Bug#: 70468
Product: Mono: Compilers
Version: 1.1
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Normal
Component: C#
AssignedTo: mono-bugs@ximian.com
ReportedBy: bmaurer@users.sf.net
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
-Cc:
Summary: Constant value `-1' cannot be converted to System.IFormattable
[benm@omega benm]$ cat t.cs
class X {
static void Main ()
{
@@ -26,6 +25,14 @@
[benm@omega benm]$ mcs t.cs
t.cs(4) error CS0031: Constant value `-1' cannot be converted to
System.IFormattable
Compilation failed: 1 error(s), 0 warnings
Note this *only* happens with negative numbers.
+
+------- Additional Comments From rharinath@novell.com 2004-12-15 04:02 -------
+As well for constant expressions like 1+1. As well for IComparable.
+
+IIUC, this is because we don't seem to handle implicit boxing
+conversions well. It seems to be special-cased for IConvertible, but
+not for other interfaces.
+