Skip to content

Commit

Permalink
Move setting fHasVirtualStaticMethods out of sanity check section (#5…
Browse files Browse the repository at this point in the history
  • Loading branch information
trylek authored Jun 23, 2021
1 parent 0416c34 commit 89603ec
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/coreclr/vm/methodtablebuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2906,6 +2906,13 @@ MethodTableBuilder::EnumerateClassMethods()
IDS_CLASSLOAD_BADSPECIALMETHOD,
tok);
}

// Check for the presence of virtual static methods
if (IsMdVirtual(dwMemberAttrs) && IsMdStatic(dwMemberAttrs))
{
bmtProp->fHasVirtualStaticMethods = TRUE;
}

//
// But first - minimal flags validity checks
//
Expand Down Expand Up @@ -2972,11 +2979,7 @@ MethodTableBuilder::EnumerateClassMethods()
}
if(IsMdStatic(dwMemberAttrs))
{
if (fIsClassInterface)
{
bmtProp->fHasVirtualStaticMethods = TRUE;
}
else
if (!fIsClassInterface)
{
// Static virtual methods are only allowed to exist in interfaces
BuildMethodTableThrowException(BFA_VIRTUAL_STATIC_METHOD);
Expand Down

0 comments on commit 89603ec

Please sign in to comment.