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:
authorTomáš Rylek <trylek@microsoft.com>2021-06-24 00:24:06 +0300
committerGitHub <noreply@github.com>2021-06-24 00:24:06 +0300
commit89603ecdd466f8a01f5ef59d9a4d2f2c13813e89 (patch)
treed66fd0680e8fd721b4c8915551c91397d6b8f26f /src/coreclr/vm
parent0416c3469b7bccff087b89db3d9967dfd36070a3 (diff)
Move setting fHasVirtualStaticMethods out of sanity check section (#54574)
Diffstat (limited to 'src/coreclr/vm')
-rw-r--r--src/coreclr/vm/methodtablebuilder.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/coreclr/vm/methodtablebuilder.cpp b/src/coreclr/vm/methodtablebuilder.cpp
index 24dfe4c1240..ad827323c69 100644
--- a/src/coreclr/vm/methodtablebuilder.cpp
+++ b/src/coreclr/vm/methodtablebuilder.cpp
@@ -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
//
@@ -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);