Bug 495 - Error CS0425: The constraints for type parameter `T' of method .. Consider using an explicit interface
Summary: Error CS0425: The constraints for type parameter `T' of method .. Consider us...
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2011-08-28 10:11 UTC by umbr0no
Modified: 2011-08-31 16:49 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
An example solution to demonstrate the problem (1.78 MB, application/zip)
2011-08-28 10:11 UTC, umbr0no
Details

Description umbr0no 2011-08-28 10:11:24 UTC
Created attachment 200 [details]
An example solution to demonstrate the problem

Hello,

I try to compile Umbraco code. I made an example project which demonstrates the error. 

The attached solution should work on windows/vs2010. 
The attached solution should fail on monodevelop beta3 with mono trunk/master (2.11) build. 

Note: I tried to make a same class/interface/inheritance/constraint structure, but I could not make an example which break the same way as the attached example. Therefore I am not 100% shure what is causing the error. 

By analyzing the code I cannot not understand why this error occurs.

.. 

Detailed information about the error:

Error CS0425: The constraints for type parameter `T' of method `Umbraco.Framework.IO.RepositoryReadWriter.AddOrUpdate<T>(System.Collections.Generic.IEnumerable<Umbraco.Framework.Persistence.Model.Versioning.Revision<T>>)' must match the constraints for type parameter `T' of interface method `Umbraco.Framework.Persistence.ProviderSupport.IRepositoryReadWriter.AddOrUpdate<T>(System.Collections.Generic.IEnumerable<Umbraco.Framework.Persistence.Model.Versioning.Revision<T>>)'. Consider using an explicit interface implementation instead (CS0425) (Umbraco.Framework.IO)
Comment 1 Marek Safar 2011-08-30 15:56:15 UTC
Fixed in master
Comment 2 umbr0no 2011-08-31 15:46:42 UTC
After updated the git from master the example is fixed! Thank you. :-)

Note :

After trying to build the whole project again, 2 new errors are introduced :

Error CS0584: Internal compiler error: Object reference not set to an instance of an object (CS0584) 

Error CS0266: Cannot implicitly convert type `<fake$type>' to `System.Web.IHtmlString'. An explicit conversion exists (are you missing a cast?) (CS0266)
Comment 4 Marek Safar 2011-08-31 16:49:30 UTC
Please create some form of sample

Note You need to log in before you can comment on or make changes to this bug.