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

Fixed hash issue with failed delegate ref return type

This commit is contained in:
Brian Fiete 2020-09-10 11:25:53 -07:00
parent 947426b384
commit a852bdb8cc
2 changed files with 4 additions and 4 deletions

View file

@ -8864,7 +8864,10 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
auto returnType = ResolveTypeRef(delegateTypeRef->mReturnType, NULL, BfPopulateType_Declaration);
if (returnType == NULL)
{
failed = true;
returnType = GetPrimitiveType(BfTypeCode_Var);
}
_CheckType(returnType);
BfType* functionThisType = NULL;

View file

@ -2848,7 +2848,7 @@ int BfResolvedTypeSet::Hash(BfTypeReference* typeRef, LookupContext* ctx, BfHash
{
return DirectHash(typeRef, ctx, flags);
}
else if (auto genericInstTypeRef = BfNodeDynCastExact<BfGenericInstanceTypeRef>(typeRef))
if (auto genericInstTypeRef = BfNodeDynCastExact<BfGenericInstanceTypeRef>(typeRef))
{
//BfType* type = NULL;
BfTypeDef* elementTypeDef = ctx->mModule->ResolveGenericInstanceDef(genericInstTypeRef, NULL, ctx->mResolveFlags);
@ -2926,9 +2926,6 @@ int BfResolvedTypeSet::Hash(BfTypeReference* typeRef, LookupContext* ctx, BfHash
HashGenericArguments(genericInstTypeRef, ctx, hashVal);
/*for (auto genericArg : genericInstTypeRef->mGenericArguments)
hashVal = ((hashVal ^ (Hash(genericArg, ctx))) << 5) - hashVal;*/
return hashVal;
}
else if (auto tupleTypeRef = BfNodeDynCastExact<BfTupleTypeRef>(typeRef))