[Mono-bugs] [Bug 78400][Nor] New - Compile error with generics

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon May 15 03:46:34 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 adrinael at adrinael.net.

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

--- shadow/78400	2006-05-15 03:46:34.000000000 -0400
+++ shadow/78400.tmp.6749	2006-05-15 03:46:34.000000000 -0400
@@ -0,0 +1,67 @@
+Bug#: 78400
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: Fedora Core 5
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: adrinael at adrinael.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Compile error with generics
+
+Here's code:
+
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+public class Qux<X,V> : IEnumerable<V>
+	where V : IComparable<V>
+{
+	public IEnumerator<V> GetEnumerator()
+	{
+		yield break;
+	}
+
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+        	yield break;
+        }
+}
+
+public class foo<X,V> : Qux<X,V>
+	where V : IComparable<V>
+{
+}
+
+
+And here's the compile result:
+
+
+generics.cs(19,25): error CS0305: Using the generic type
+`System.IComparable<T>' requires 1 type arguments
+
+
+
+Expected Results:
+
+Successful compile
+
+How often does this happen? 
+
+Always
+
+
+Additional Information:
+
+
+Happens with mono 1.1.13.7-1.fc5.1 (Fedora Core 5 package) and with svn
+mono (trunk) HEAD pulled 2006-05-12 -ish.


More information about the mono-bugs mailing list