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:
parent
1bacf5eee2
commit
717d6aa4cf
6 changed files with 71 additions and 61 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue