Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 for Bug 9545 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 3211 [details]
Unhandled Exception: System.TypeLoadException: Method 'IA.f' on type 'A' from as
sembly 'test-996, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' tried t
o explicitly implement an interface method with weaker type parameter constraint
Ouch! This one is really really hard.
How do I check if a given set of constraints is weaker than another?
I think by weaker they mean is not as restrictive as the other type parameter which is quite simple for non-inflated versions (you just match set of ifaces+base type) but it's more complicated for inflated type parameters. C# implementation is in TypeParameterSpec::HasSameConstraintsImplementation and it should match to runtime checks and vice versa I think.
This is really really complex and virtual generic method constraints are contravariant.
I'm moving this down to enhancement as it would be a huge time sink to implement it.