Bug 492265 - Generics example fails to compile due to bug parsing constraints.
Summary: Generics example fails to compile due to bug parsing constraints.
Status: RESOLVED DUPLICATE of bug 537402
Alias: None
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 2.4.x
Hardware: x86-64 Ubuntu
: P3 - Medium : Major
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-04 16:00 UTC by James Michels
Modified: 2009-09-08 17:54 UTC (History)
0 users

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


Attachments
Example code (470 bytes, text/plain)
2009-04-04 16:00 UTC, James Michels
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Michels 2009-04-04 16:00:17 UTC
Created attachment 284131 [details]
Example code

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.7; .NET CLR 3.5; ffco7) Gecko/2009021910 Firefox/3.0.7

The compiler is generating an error for valid code. I am attaching example code to reproduce the problem.

I am seeing the following error.

[Task:File=/home/jmichels/projects/GenericsBugProof/Main.cs, Line=11, Column=36, Type=Error, Priority=Normal, Description=The type `GenericsBugProof.MainClass.Item<GenericsBugProof.MainClass.TypeFamily>' must be convertible to `GenericsBugProof.MainClass.Item<GenericsBugProof.MainClass.Item<GenericsBugProof.MainClass.TypeFamily>>' in order to use it as parameter `T' in the generic type or method `GenericsBugProof.MainClass.Collection<TF>.Find<T>()'(CS0309)]

Reproducible: Always

Steps to Reproduce:
1. Compile example code.
2. See compiler error.
3. Profit

Actual Results:  
Unexpected compiler error.



Expected Results:  
No compiler errors
Comment 1 Marek Safar 2009-09-08 17:54:22 UTC
Fixed in trunk.

*** This bug has been marked as a duplicate of bug 537402 ***