[Mono-bugs] [Bug 77995][Wis] New - Interfaces are not recognized as
reference types in generic parameters.
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Apr 3 05: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 gael at fraiteur.net.
http://bugzilla.ximian.com/show_bug.cgi?id=77995
--- shadow/77995 2006-04-03 05:46:34.000000000 -0400
+++ shadow/77995.tmp.22270 2006-04-03 05:46:34.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 77995
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details: Linux 2.6.16-1.2080_FC5 #1 SMP
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: gael at fraiteur.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Interfaces are not recognized as reference types in generic parameters.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+Interfaces are not recognized as reference types when used as arguments of
+generic parameters with "class" constraint.
+
+The type `I' must be a reference type in order to use it as type parameter
+`T' in the generic type or method `A<T>'
+
+Steps to reproduce the problem:
+class A<T> where T: class {}
+interface I{}
+class B : A<I> {}
+
+
+Actual Results:
+TestGenericInterfaceArgument.cs(3,11): error CS0452: The type `I' must be a
+reference type in order to use it as type parameter `T' in the generic type
+or method `A<T>'.
+Compilation failed: 1 error(s), 0 warnings
+
+
+Expected Results:
+Should compile. Microsoft does.
+
+How often does this happen?
+Always.
+
+Additional Information:
+Mono C# compiler version 1.1.13.4
More information about the mono-bugs
mailing list