[Mono-bugs] [Bug 77299][Wis] New - error for simple recursive
generic type
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Jan 18 16:09:49 EST 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 bcs26 at cornell.edu.
http://bugzilla.ximian.com/show_bug.cgi?id=77299
--- shadow/77299 2006-01-18 16:09:49.000000000 -0500
+++ shadow/77299.tmp.17292 2006-01-18 16:09:49.000000000 -0500
@@ -0,0 +1,37 @@
+Bug#: 77299
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: bcs26 at cornell.edu
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: error for simple recursive generic type
+
+The attached RecType.cs test case compiles without errors. The attached
+RecTypeUse.cs test case, however, fails to compile with the following error:
+
+$ gmcs RecType.cs
+RecType.cs(17,24): error CS0309: The type `RealFoo<int>' must be
+convertible to `Foo<T>' in order to use it as parameter `T' in the generic
+type or method `Bar<T>'
+RecType.cs(13,14):: `Bar<T>', name of symbol related to previous error
+RecType.cs(7,14):: `RealFoo<E>', name of symbol related to previous error
+Compilation failed: 1 error(s), 0 warnings
+
+
+Using mono 1.1.12.1 under Gentoo on amd64. I'm actually not sure if either
+of these test cases should compile, but it seems as if either both should
+(what I would expect), or neither should (if C# disallows generic types of
+this form).
+
+If the existing behavior is correct, then the gmcs error message is
+misleading, since the types listed are in fact convertible.
More information about the mono-bugs
mailing list