[Mono-bugs] [Bug 62909][Wis] New - gmcs: gmcs rejects constraint with dependency an another constraint

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 12 Aug 2004 01:14:17 -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 benmartin@fourthplanet.net.

http://bugzilla.ximian.com/show_bug.cgi?id=62909

--- shadow/62909	2004-08-12 01:14:17.000000000 -0400
+++ shadow/62909.tmp.31453	2004-08-12 01:14:17.000000000 -0400
@@ -0,0 +1,41 @@
+Bug#: 62909
+Product: Mono: Compilers
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: benmartin@fourthplanet.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: gmcs: gmcs rejects constraint with dependency an another constraint
+
+gmcs gives errors on the following code:
+
+using System;
+
+class A<T> where T: IComparable  {
+}
+
+class B<S, T> where T: IComparable where S: A<T> {
+}
+
+class Driver {
+  public static void Main()
+  {
+    A<int> a_int;
+    B<A<int>, int> b_stuff;
+  }
+}
+
+with the following error:
+cp_test5.cs(6) error CS0309: The type `T' must be convertible to
+`System.IComparable' in order to use it as parameter `T' in the generic
+type or method `A`1<T>'
+Compilation failed: 1 error(s), 0 warnings