Skip to content

Commit

Permalink
Tweak classcompat loader to skip MethodImpls associated with static m…
Browse files Browse the repository at this point in the history
…ethods (#54658)
  • Loading branch information
davidwrighton authored Jun 25, 2021
1 parent 3924d03 commit 57bfe47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/vm/classcompat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 57bfe47

Please sign in to comment.