Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mono][metadata] Fix overriding of methods from parent variant interf…
…aces As an example from the now enabled test. ``` interface InterfaceScenario2<in T> { static abstract int Method (); } class BaseScenario2 : InterfaceScenario2<string, InterfaceScenario2<object> { public static int Method() { // .override method int32 class InterfaceScenario2`1<string>::Method() return 2; } public static int32 Method_Obj() { // .override method int32 class InterfaceScenario2`1<object>::Method() return 3; } } class DerivedScenario2 : BaseScenario2 { public static int Method () { // .override method int32 class InterfaceScenario2`1<object>::Method() return 6; } } public static string Test_Scenario2_1<T, ImplType>() where ImplType : InterfaceScenario2<T> { return ImplType.Method ().ToString (); } Test_Scenario2_1<string, DerivedScenario2> ()); ``` This test calls InterfaceScenario2<string> on DerviedScenario2. This should call DerivedScenario2.Method (not BaseScenario2.Method) because this method overrides (in BaseScenario2) both the obvious slot for InterfaceScenario2<object> as well as the slot for variant compatible interface InterfaceScenario2<string>.
- Loading branch information