mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
mCurTypeInstance NULL check
This commit is contained in:
parent
c18c76b4fe
commit
f4ef2d1fbf
1 changed files with 24 additions and 20 deletions
|
@ -3429,13 +3429,16 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
|
||||||
|
|
||||||
if (typeDef->mGenericParamDefs.size() != 0)
|
if (typeDef->mGenericParamDefs.size() != 0)
|
||||||
{
|
{
|
||||||
|
BfTypeDef* commonOuterType = NULL;
|
||||||
|
|
||||||
auto checkTypeInstance = ctx->mModule->mCurTypeInstance;
|
auto checkTypeInstance = ctx->mModule->mCurTypeInstance;
|
||||||
|
if (checkTypeInstance != NULL)
|
||||||
|
{
|
||||||
if (checkTypeInstance->IsBoxed())
|
if (checkTypeInstance->IsBoxed())
|
||||||
checkTypeInstance = checkTypeInstance->GetUnderlyingType()->ToTypeInstance();
|
checkTypeInstance = checkTypeInstance->GetUnderlyingType()->ToTypeInstance();
|
||||||
|
|
||||||
auto outerType = ctx->mModule->mSystem->GetOuterTypeNonPartial(typeDef);
|
auto outerType = ctx->mModule->mSystem->GetOuterTypeNonPartial(typeDef);
|
||||||
|
|
||||||
BfTypeDef* commonOuterType;
|
|
||||||
if (typeRef == ctx->mRootTypeRef)
|
if (typeRef == ctx->mRootTypeRef)
|
||||||
commonOuterType = FindRootCommonOuterType(outerType, ctx, checkTypeInstance);
|
commonOuterType = FindRootCommonOuterType(outerType, ctx, checkTypeInstance);
|
||||||
else
|
else
|
||||||
|
@ -3458,6 +3461,7 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((commonOuterType == NULL) || (commonOuterType->mGenericParamDefs.size() == 0))
|
if ((commonOuterType == NULL) || (commonOuterType->mGenericParamDefs.size() == 0))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue