Bug 320744 (MONO77995) - [GMCS] Interfaces are not recognized as reference types in generic parameters.
Summary: [GMCS] Interfaces are not recognized as reference types in generic parameters.
Status: RESOLVED FIXED
Alias: MONO77995
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Raja R Harinath
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-03 12:46 UTC by Gael Fraiteur
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:53:53 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".