Bugzilla – Bug 320744
[GMCS] Interfaces are not recognized as reference types in generic parameters.
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by gael@fraiteur.net 2006-04-03 05:46:34 MST ---- 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 ---- Additional Comments From martin@ximian.com 2006-06-21 17:11:30 MST ---- Works for me. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Linux 2.6.16-1.2080_FC5 #1 SMP</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".