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:
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)
|
||||
{
|
||||
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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue