[Mono-bugs] [Bug 58306][Min] New - String should implement IComparable<String>
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 10 May 2004 18:47:27 -0400 (EDT)
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 sestoft@dina.kvl.dk.
http://bugzilla.ximian.com/show_bug.cgi?id=58306
--- shadow/58306 2004-05-10 18:47:27.000000000 -0400
+++ shadow/58306.tmp.11077 2004-05-10 18:47:27.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 58306
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: sestoft@dina.kvl.dk
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: String should implement IComparable<String>
+
+Description of Problem:
+
+In Microsoft's implementation, String implements IComparable<String>, and
+similarly for int, double, etc. In Mono, these types (at least String) do
+not. I'm not sure whether this is actually specified in the CLI, but it is
+immensely convenient and should be.
+
+Steps to reproduce the problem:
+1. Compile the attached
+
+
+Actual Results:
+
+Mono C# Compiler 0.91.0.0 for Generics
+ex-gen-type-parameter-in-constraint.cs(38) error CS0309: The type
+`System.String' must be convertible to
+`System.Collections.Generic.IComparable!1[T]' in order to use it as
+parameter `T' in the generic type or method `ComparablePair!2<T,U>'
+ex-gen-type-parameter-in-constraint.cs(38) error CS0246: Cannot find type
+`ComparablePair<String,System.Int32>'
+ex-gen-type-parameter-in-constraint.cs(48) error CS0309: The type
+`System.String' must be convertible to
+`System.Collections.Generic.IComparable!1[T]' in order to use it as
+parameter `T' in the generic type or method `ComparablePair!2<T,U>'
+
+
+Expected Results:
+
+Compiles OK.