[Mono-bugs] [Bug 78687][Blo] New - Broken generics (another example).

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Jun 21 19:36:31 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 kjo22 at cornell.edu.

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

--- shadow/78687	2006-06-21 19:36:31.000000000 -0400
+++ shadow/78687.tmp.13740	2006-06-21 19:36:31.000000000 -0400
@@ -0,0 +1,34 @@
+Bug#: 78687
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: kjo22 at cornell.edu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Summary: Broken generics (another example).
+
+Another example of broken generic support. I removed unimportant parts.
+While parsing the "where" clause, your compiler complains that
+Refcollection<K,T> doesn't have member "Element", even though it's there.
+The same compiles without problems in Visual Studio.
+
+    public class RefCollection<K,T> : IRefCollection<K,T> 
+        where T : RefCollection<K,T>.Element, new() 
+        where K : System.IComparable, System.IComparable<K>
+    {
+        public abstract class Element : 
+             Collections2.BTNOf<K>, System.IDisposable
+        {
+            ...
+        }
+
+        ...
+    }


More information about the mono-bugs mailing list