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

GNU extension override mangling fix

This commit is contained in:
Brian Fiete 2020-10-23 14:18:06 -07:00
parent 101fde1a4b
commit 20b1ccd672

View file

@ -901,7 +901,9 @@ String BfGNUMangler::Mangle(BfMethodInstance* methodInst)
else if (methodDef->mCheckedKind == BfCheckedKind_Unchecked)
name += "`UCHK";
if ((methodInst->mMethodDef->mDeclaringType->mPartialIdx != -1) && (!methodInst->mIsForeignMethodDef))
if ((methodInst->mMethodDef->mDeclaringType->mPartialIdx != -1) && (methodInst->mMethodDef->mDeclaringType->IsExtension()) &&
(!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);