Bug 8232

Summary: wrong CS0314 error from compiler on generic method override
Product: [Mono] Compilers Reporter: Giacomo Tesio <giacomo.tesio>
Component: C#Assignee: Marek Safar <masafa>
Severity: normal CC: giacomo.tesio, mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: A sample code that reproduce the bug

Description Giacomo Tesio 2012-11-05 17:32:35 UTC
Created attachment 2870 [details]
A sample code that reproduce the bug

In the attached sample the compiler produce an error like this:

Test.cs(27,27): Error CS0314: The type `MoreSpecialized' cannot be used as type parameter `Specialization' in the generic type or method `Test.A<Abstraction>.For<Specialization>()'. There is no boxing or type parameter conversion from `MoreSpecialized' to `Abstraction' (CS0314)

This is wrong becouse of the constraints in A.For and in B declaration.
Comment 1 Giacomo Tesio 2012-11-07 13:48:55 UTC
I'm running the master branch from github.
Comment 2 Marek Safar 2012-11-10 09:38:23 UTC
Fixed in master