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 [EMAIL PROTECTED]

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

--- shadow/78686        2006-06-21 19:30:13.000000000 -0400
+++ shadow/78686.tmp.13380      2006-06-21 19:30:13.000000000 -0400
@@ -0,0 +1,68 @@
+Bug#: 78686
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: C#
+AssignedTo: [EMAIL PROTECTED]                            
+ReportedBy: [EMAIL PROTECTED]               
+QAContact: [EMAIL PROTECTED]
+TargetMilestone: ---
+URL: 
+Summary: Cannot properly handle generics.
+
+The following doesn't compile in Mono, although it should (and it does
+compile in Visual Studio). Your compiler complains about the AVLNode
+definition, claiming that C is not known to be IBSTNode, although it's
+clearly so for it is IAVLNode that inherits IBSTNode.
+
+This is just one of many examples in which your C# compiler crashes on
+generics code, for it cannot properly process circular dependencies.
+
+    public interface INode<K> : IComparable<K> where K : IComparable<K>
+    {
+        K Key
+        {
+            get;
+        }
+    }
+
+    public interface IBTNode<C> where C : IBTNode<C> 
+    {
+        C Parent
+        {
+            get;
+            set;
+        }
+
+        C Left
+        {
+            get;
+            set;
+        }
+
+        C Right
+        {
+            get;
+            set;
+        }
+    }
+
+    public interface IBSTNode<K, C> : IBTNode<C>, INode<K> 
+        where C : IBSTNode<K, C> where K : IComparable<K>
+    {
+    }
+
+    public interface IAVLNode<K, C> : IBSTNode<K, C> 
+        where C : IAVLNode<K, C> where K : IComparable<K>
+    {
+        int Balance
+        {
+            get;
+            set;
+        }
+    }
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to