mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed internal override mangling in same project
This commit is contained in:
parent
84594e66ff
commit
8b74b15102
1 changed files with 6 additions and 2 deletions
|
@ -20222,7 +20222,12 @@ void BfModule::SetupIRFunction(BfMethodInstance* methodInstance, StringImpl& man
|
|||
prevFunc = mBfIRBuilder->GetFunction(mangledName);
|
||||
if (prevFunc)
|
||||
{
|
||||
if (methodDef->mIsExtern)
|
||||
if ((methodDef->mIsOverride) && (mCurTypeInstance->mTypeDef->mIsCombinedPartial))
|
||||
{
|
||||
BfLogSysM("Function collision from inner override erased prevFunc %p: %d\n", methodInstance, prevFunc.mId);
|
||||
mBfIRBuilder->Func_EraseFromParent(prevFunc);
|
||||
}
|
||||
else if (methodDef->mIsExtern)
|
||||
{
|
||||
// Allow this
|
||||
BfLogSysM("Function collision allowed multiple extern functions for %p: %d\n", methodInstance, prevFunc.mId);
|
||||
|
@ -20242,7 +20247,6 @@ void BfModule::SetupIRFunction(BfMethodInstance* methodInstance, StringImpl& man
|
|||
else
|
||||
{
|
||||
BfLogSysM("Function collision erased prevFunc %p: %d\n", methodInstance, prevFunc.mId);
|
||||
|
||||
mBfIRBuilder->Func_EraseFromParent(prevFunc);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue