Bugzilla – Bug 8232
wrong CS0314 error from compiler on generic method override
Last modified: 2012-11-10 09:38:23 EST
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.
I'm running the master branch from github.
Fixed in master