Don't return null target methods in GetInterfaceMap for abstract classes, or classes...
authorAleksey Kliger (λgeek) <alklig@microsoft.com>
Tue, 15 Jun 2021 18:56:58 +0000 (14:56 -0400)
committerGitHub <noreply@github.com>
Tue, 15 Jun 2021 18:56:58 +0000 (14:56 -0400)
commit4e03f3665ad197b005b361b3b7cdf7fcac298ef2
treeecd0ed783ab0b689db74a0d2457baca8cb7ec093
parentab71c1f4031d449ed3d60ccaaecb629bb73b648a
Don't return null target methods in GetInterfaceMap for abstract classes, or classes using DIMs (#53972)

* Add DIM tests for GetInterfaceMap

Regression tests for https://github.com/dotnet/runtime/issues/53933

* Return null target methods from GetInterfaceMap in fewer cases

If the iterface method is reabstracted, and either the found implementation
method is abstract, or the found implementation method is from another
DIM (meaning neither klass nor any of its ancestor classes implemented the
method), then say the target method is null.  Otherwise return the found
implementation method, even if it is abstract, unless we found a reabstracted
method in a non-abstract class

Fixes https://github.com/dotnet/runtime/issues/53933
src/libraries/System.Runtime/tests/System/Type/TypeTests.cs
src/mono/mono/metadata/icall.c