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

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 11 Dec 2004 16:52:27 -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-11 16:52:27.000000000 -0500
+++ shadow/70468.tmp.20066	2004-12-11 16:52:27.000000000 -0500
@@ -0,0 +1,31 @@
+Bug#: 70468
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+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 ()
+        {
+                System.IFormattable foo = -1;
+        }
+}
+[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.