diff options
Diffstat (limited to 'src/vm/classcompat.cpp')
-rw-r--r-- | src/vm/classcompat.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vm/classcompat.cpp b/src/vm/classcompat.cpp index fb97a79e85..fb48a15221 100644 --- a/src/vm/classcompat.cpp +++ b/src/vm/classcompat.cpp @@ -2612,6 +2612,26 @@ VOID MethodTableBuilder::EnumerateClassMethods() } } + // Some interface checks. + if (fIsClassInterface) + { + if (IsMdVirtual(dwMemberAttrs)) + { + if (!IsMdAbstract(dwMemberAttrs) && (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_TypeLoader_DefaultInterfaces) == 0)) + { + BuildMethodTableThrowException(BFA_VIRTUAL_NONAB_INT_METHOD); + } + } + else + { + // Instance field/method + if (!IsMdStatic(dwMemberAttrs) && (CLRConfig::GetConfigValue(CLRConfig::UNSUPPORTED_TypeLoader_DefaultInterfaces) == 0)) + { + BuildMethodTableThrowException(BFA_NONVIRT_INST_INT_METHOD); + } + } + } + // No synchronized methods in ValueTypes if(fIsClassValueType && IsMiSynchronized(dwImplFlags)) { |