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

Fixed TypeEquals

This commit is contained in:
Brian Fiete 2022-01-16 08:06:32 -05:00
parent c2ed003741
commit 296faa7510

View file

@ -4945,12 +4945,12 @@ bool BfTypeUtils::TypeEquals(BfType* typeA, BfType* typeB, BfTypeInstance* selfT
if (typeA->IsUnspecializedTypeVariation()) if (typeA->IsUnspecializedTypeVariation())
{ {
SetAndRestoreValue<BfTypeInstance*> prevCurTypeInst(selfType->mModule->mCurTypeInstance, selfType); SetAndRestoreValue<BfTypeInstance*> prevCurTypeInst(selfType->mModule->mCurTypeInstance, selfType);
return selfType->mModule->ResolveGenericType(typeA, NULL, NULL); typeA = selfType->mModule->ResolveGenericType(typeA, NULL, NULL);
} }
if (typeB->IsUnspecializedTypeVariation()) if (typeB->IsUnspecializedTypeVariation())
{ {
SetAndRestoreValue<BfTypeInstance*> prevCurTypeInst(selfType->mModule->mCurTypeInstance, selfType); SetAndRestoreValue<BfTypeInstance*> prevCurTypeInst(selfType->mModule->mCurTypeInstance, selfType);
return selfType->mModule->ResolveGenericType(typeB, NULL, NULL); typeB = selfType->mModule->ResolveGenericType(typeB, NULL, NULL);
} }
return typeA == typeB; return typeA == typeB;
} }