Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wrighton <davidwr@microsoft.com>2021-06-25 21:10:50 +0300
committerGitHub <noreply@github.com>2021-06-25 21:10:50 +0300
commit57bfe474518ab5b7cfe6bf7424a79ce3af9d6657 (patch)
tree7c9b26ebe14cb00d9f85a63ff28a3d7908bf302c /src/coreclr/vm
parent3924d0308110f6365e47e784b8c7cf1e8f7efa2b (diff)
Tweak classcompat loader to skip MethodImpls associated with static methods (#54658)
Diffstat (limited to 'src/coreclr/vm')
-rw-r--r--src/coreclr/vm/classcompat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coreclr/vm/classcompat.cpp b/src/coreclr/vm/classcompat.cpp
index 3c9556a6623..1870e6f3dd0 100644
--- a/src/coreclr/vm/classcompat.cpp
+++ b/src/coreclr/vm/classcompat.cpp
@@ -939,7 +939,7 @@ VOID MethodTableBuilder::BuildInteropVTable_PlaceMembers(
}
}
- if(Classification & mdcMethodImpl)
+ if (Classification & mdcMethodImpl)
{ // If this method serves as the BODY of a MethodImpl specification, then
// we should iterate all the MethodImpl's for this class and see just how many
// of them this method participates in as the BODY.
@@ -2807,7 +2807,7 @@ VOID MethodTableBuilder::EnumerateClassMethods()
// on this type so we can just compare the tok with the body token found
// from the overrides.
for(DWORD impls = 0; impls < bmtMethodImpl->dwNumberMethodImpls; impls++) {
- if(bmtMethodImpl->rgMethodImplTokens[impls].methodBody == tok) {
+ if ((bmtMethodImpl->rgMethodImplTokens[impls].methodBody == tok) && !IsMdStatic(dwMemberAttrs)) {
Classification |= mdcMethodImpl;
break;
}