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

Better fix for VerifyTypeLookups

This commit is contained in:
Brian Fiete 2021-02-28 11:41:00 -08:00
parent a412452bac
commit c598944f52
4 changed files with 87 additions and 45 deletions

View file

@ -2276,8 +2276,18 @@ void BfContext::VerifyTypeLookups(BfTypeInstance* typeInst)
// so the mNextRevision will be ignored
auto useTypeDef = lookupEntry.mUseTypeDef;
BfTypeDef* ambiguousTypeDef = NULL;
BfTypeDef* result = typeInst->mModule->FindTypeDefRaw(lookupEntry.mName, lookupEntry.mNumGenericParams, typeInst, useTypeDef, NULL);
if (result != lookupEntryPair.mValue.mTypeDef)
BfTypeLookupResult* lookupResult = &lookupEntryPair.mValue;
BfTypeLookupResultCtx lookupResultCtx;
lookupResultCtx.mResult = lookupResult;
lookupResultCtx.mIsVerify = true;
BfTypeDef* result = typeInst->mModule->FindTypeDefRaw(lookupEntry.mName, lookupEntry.mNumGenericParams, typeInst, useTypeDef, NULL, &lookupResultCtx);
if ((result == NULL) && (lookupResult->mFoundInnerType))
{
// Allow this- if there were new types added then the types would be rebuilt already
}
else if (result != lookupResult->mTypeDef)
{
isDirty = true;
}