1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Added extern method override support in extensions

This commit is contained in:
Brian Fiete 2020-10-23 11:48:37 -07:00
parent 1e020dc14e
commit 101fde1a4b
8 changed files with 99 additions and 35 deletions

View file

@ -2018,9 +2018,10 @@ void BfMSMangler::Mangle(StringImpl& name, bool is64Bit, BfMethodInstance* metho
else
AddStr(mangleContext, name, methodDef->mName);
}
if ((methodInst->mMethodDef->mDeclaringType->mPartialIdx != -1) && (methodInst->mMethodDef->mDeclaringType->IsExtension()) &&
(!methodInst->mIsForeignMethodDef) && (!methodInst->mMethodDef->mIsExtern))
(!methodInst->mIsForeignMethodDef) && (!methodInst->mMethodDef->mIsExtern) &&
((!methodInst->mMethodDef->mIsOverride) || (methodDef->mName == BF_METHODNAME_MARKMEMBERS) || (methodDef->mMethodType == BfMethodType_Dtor)))
{
auto declType = methodInst->mMethodDef->mDeclaringType;
BF_ASSERT(methodInst->GetOwner()->mTypeDef->mIsCombinedPartial);
@ -2098,7 +2099,10 @@ void BfMSMangler::Mangle(StringImpl& name, bool is64Bit, BfMethodInstance* metho
if ((methodDef->mIsStatic) || (doExplicitThis))
attrib += 2;
attrib += (methodDef->mIsVirtual ? 4 : 0);
if ((methodDef->mIsVirtual) && (!methodDef->mIsOverride))
attrib += 4;
name += attrib;
auto bfSystem = methodInst->GetOwner()->mModule->mSystem;