mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed crash in failed rettype
This commit is contained in:
parent
46947636f7
commit
3f1f114180
1 changed files with 7 additions and 2 deletions
|
@ -3706,7 +3706,7 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
|
||||||
// Don't allow 'let'
|
// Don't allow 'let'
|
||||||
ctx->mModule->Fail("Invalid use of 'let'", typeRef);
|
ctx->mModule->Fail("Invalid use of 'let'", typeRef);
|
||||||
ctx->mFailed = true;
|
ctx->mFailed = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (auto retTypeTypeRef = BfNodeDynCastExact<BfModifiedTypeRef>(typeRef))
|
else if (auto retTypeTypeRef = BfNodeDynCastExact<BfModifiedTypeRef>(typeRef))
|
||||||
{
|
{
|
||||||
|
@ -3715,7 +3715,12 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
|
||||||
if (ctx->mRootTypeRef != retTypeTypeRef)
|
if (ctx->mRootTypeRef != retTypeTypeRef)
|
||||||
{
|
{
|
||||||
auto type = ctx->mModule->ResolveTypeRef(retTypeTypeRef, BfPopulateType_Identity, GetResolveFlags(retTypeTypeRef, ctx, flags));
|
auto type = ctx->mModule->ResolveTypeRef(retTypeTypeRef, BfPopulateType_Identity, GetResolveFlags(retTypeTypeRef, ctx, flags));
|
||||||
if ((type != NULL) && (type->IsRef()))
|
if (type == NULL)
|
||||||
|
{
|
||||||
|
ctx->mFailed = true;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (type->IsRef())
|
||||||
type = type->GetUnderlyingType();
|
type = type->GetUnderlyingType();
|
||||||
return Hash(type, ctx, flags, hashSeed);
|
return Hash(type, ctx, flags, hashSeed);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue