Fixing the GetInterfaceMap tests for mono in the runtime repo. (#21094)
commit9570aef339499993094fba248155515d3fd7e6a4
authorBill Holmes <bill.holmes@unity3d.com>
Mon, 7 Jun 2021 16:12:26 +0000 (7 12:12 -0400)
committerGitHub <noreply@github.com>
Mon, 7 Jun 2021 16:12:26 +0000 (7 18:12 +0200)
tree342c99ccddc2a068ac06352e999c2fee558612cb
parent4e080bb9c34036df7e00a6328fb881a7418be848
Fixing the GetInterfaceMap tests for mono in the runtime repo. (#21094)

Addressing 4 issues for GetInterfaceMap and default interface methods

Only methods marked as virtual on on interface should be added to the
interface map. (no static or instance)
If the found target method is ambiguous (a diamond) the target is
null.
If the found target method's class in an interface, then the target
class is the interface class, else it is the class of the RuntimeType
(aka this)
If the found target method is abstract (reabstraction) then the
target is null.

https://github.com/dotnet/runtime/blob/6072e4d/src/tests/reflection/DefaultInterfaceMethods/GetInterfaceMapConsumer.cs
mono/metadata/icall.c