1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 20:12:21 +02:00

mCurTypeInstance NULL check

This commit is contained in:
Brian Fiete 2023-06-30 06:47:03 -04:00
parent c18c76b4fe
commit f4ef2d1fbf

View file

@ -3429,13 +3429,16 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
if (typeDef->mGenericParamDefs.size() != 0)
{
BfTypeDef* commonOuterType = NULL;
auto checkTypeInstance = ctx->mModule->mCurTypeInstance;
if (checkTypeInstance != NULL)
{
if (checkTypeInstance->IsBoxed())
checkTypeInstance = checkTypeInstance->GetUnderlyingType()->ToTypeInstance();
auto outerType = ctx->mModule->mSystem->GetOuterTypeNonPartial(typeDef);
BfTypeDef* commonOuterType;
if (typeRef == ctx->mRootTypeRef)
commonOuterType = FindRootCommonOuterType(outerType, ctx, checkTypeInstance);
else
@ -3458,6 +3461,7 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
}
}
}
}
if ((commonOuterType == NULL) || (commonOuterType->mGenericParamDefs.size() == 0))
{