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

Fix for globals namespace conflicting with extension name

This commit is contained in:
Brian Fiete 2020-07-15 15:32:06 -07:00
parent a2047f444d
commit 37fc1a08e1
3 changed files with 26 additions and 14 deletions

View file

@ -841,6 +841,8 @@ void BfTypeDef::ReportMemory(MemReporter* memReporter)
bool BfTypeDef::NameEquals(BfTypeDef* otherTypeDef)
{
if (mName != otherTypeDef->mName)
return false;
// We can't just check mFullnames, because a namespace of "A" with a type named "B.C" would match
// a namespace of "A.B" with a type named "C"
if (mNamespace.mSize != otherTypeDef->mNamespace.mSize)
@ -2596,6 +2598,9 @@ void BfSystem::InjectNewRevision(BfTypeDef* typeDef)
BF_ASSERT(typeDef->mNameEx == nextTypeDef->mNameEx);
//typeDef->mNameEx = nextTypeDef->mNameEx;
//typeDef->mFullName = nextTypeDef->mFullName;
BF_ASSERT(typeDef->mFullNameEx == nextTypeDef->mFullNameEx);
typeDef->mProtection = nextTypeDef->mProtection;
if ((typeDef->mTypeCode != BfTypeCode_Extension) && (!typeDef->mIsCombinedPartial))
BF_ASSERT(nextTypeDef->mTypeCode != BfTypeCode_Extension);