1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Changed ResolveSelfType to not require a type instance

This commit is contained in:
Brian Fiete 2022-04-30 08:10:57 -07:00
parent 1bacf5eee2
commit 717d6aa4cf
6 changed files with 71 additions and 61 deletions

View file

@ -5242,15 +5242,9 @@ String BfTypeUtils::TypeToString(BfAstNode* typeRefNode)
bool BfTypeUtils::TypeEquals(BfType* typeA, BfType* typeB, BfTypeInstance* selfType)
{
if (typeA->IsUnspecializedTypeVariation())
{
SetAndRestoreValue<BfTypeInstance*> prevCurTypeInst(selfType->mModule->mCurTypeInstance, selfType);
typeA = selfType->mModule->ResolveGenericType(typeA, NULL, NULL);
}
typeA = selfType->mModule->ResolveSelfType(typeA, selfType);
if (typeB->IsUnspecializedTypeVariation())
{
SetAndRestoreValue<BfTypeInstance*> prevCurTypeInst(selfType->mModule->mCurTypeInstance, selfType);
typeB = selfType->mModule->ResolveGenericType(typeB, NULL, NULL);
}
typeB = selfType->mModule->ResolveSelfType(typeB, selfType);
return typeA == typeB;
}