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.