We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4e1882 commit 946b6c4Copy full SHA for 946b6c4
src/coreclr/vm/methodtablebuilder.cpp
@@ -3035,8 +3035,8 @@ MethodTableBuilder::EnumerateClassMethods()
3035
3036
// Check the appearance of covariant and contravariant in the method signature
3037
// Note that variance is only supported for interfaces, and these rules are not
3038
- // checked for static methods as they cannot be called variantly.
3039
- if ((bmtGenerics->pVarianceInfo != NULL) && !IsMdStatic(dwMemberAttrs))
+ // checked for non-virtual static methods as they cannot be called variantly.
+ if ((bmtGenerics->pVarianceInfo != NULL) && (IsMdVirtual(dwMemberAttrs) || !IsMdStatic(dwMemberAttrs)))
3040
{
3041
SigPointer sp(pMemberSignature, cMemberSignature);
3042
uint32_t callConv;
0 commit comments