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)

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


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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