[Mono-bugs] [Bug 78688][Nor] Changed - Broken generics support.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jun 22 10:15:56 EDT 2006


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 krzys at cs.cornell.edu.

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

--- shadow/78688	2006-06-22 05:18:59.000000000 -0400
+++ shadow/78688.tmp.6296	2006-06-22 10:15:56.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 78688
 Product: Mono: Compilers
 Version: 1.1
 OS: unknown
 OS Details: 
-Status: RESOLVED   
-Resolution: NOTABUG
+Status: REOPENED   
+Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: C#
 AssignedTo: rharinath at novell.com                            
 ReportedBy: krzys at cs.cornell.edu               
 QAContact: mono-bugs at ximian.com
@@ -27,6 +27,43 @@
 use it as parameter `C' in the generic type or method `IA<C>'
 
 Works in Visual Studio.
 
 ------- Additional Comments From martin at ximian.com  2006-06-22 05:18 -------
 We are correctly reporting the CS0309 here.
+
+------- Additional Comments From krzys at cs.cornell.edu  2006-06-22 10:15 -------
+I've cut out too much. Here's a more comprehensive example. It 
+doesn't compile in Mono, but it does compiles in VS2005, and it's a 
+perfectly legal C# code.
+
+error CS0309: The type `E<K,C>' must be convertible to `ID<K,E<K,C>>' 
+in order to use it as parameter `C' in the generic type or method 
+`ID<K,C>'
+
+------------------------
+
+    public interface IA<K> : System.IComparable<K> where K : 
+System.IComparable<K>
+    {
+    }
+
+    public interface IB<C> where C : IB<C> 
+    {
+    }
+
+    public interface IC<K, C> : IB<C>, IA<K> where C : IC<K, C> where 
+K : System.IComparable<K>
+    {
+    }
+
+    public interface ID<K, C> : IC<K, C> where C : ID<K, C>, IC<K, C> 
+where K : System.IComparable<K>
+    {
+    }
+
+    public class E<K, C> : ID<K, E<K, C>> where C : IA<K> where K : 
+System.IComparable<K>
+    {
+        int IComparable<K>.CompareTo(K other) { return 0; }
+    }
+


More information about the mono-bugs mailing list