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

Fixed rettype hashing

This commit is contained in:
Brian Fiete 2024-01-23 07:09:20 -05:00
parent f96de4722e
commit b108349a67
2 changed files with 2 additions and 2 deletions

View file

@ -16537,7 +16537,7 @@ void BfModule::AssertParseErrorState()
BfType* BfModule::GetDelegateReturnType(BfType* delegateType) BfType* BfModule::GetDelegateReturnType(BfType* delegateType)
{ {
BF_ASSERT(delegateType->IsDelegate()); BF_ASSERT(delegateType->IsDelegateOrFunction());
auto typeInst = delegateType->ToTypeInstance(); auto typeInst = delegateType->ToTypeInstance();
PopulateType(typeInst, BfPopulateType_DataAndMethods); PopulateType(typeInst, BfPopulateType_DataAndMethods);
BfMethodInstance* invokeMethodInstance = GetRawMethodInstanceAtIdx(typeInst->ToTypeInstance(), 0, "Invoke"); BfMethodInstance* invokeMethodInstance = GetRawMethodInstanceAtIdx(typeInst->ToTypeInstance(), 0, "Invoke");

View file

@ -3880,7 +3880,7 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
} }
if (type->IsRef()) if (type->IsRef())
type = type->GetUnderlyingType(); type = type->GetUnderlyingType();
return Hash(type, ctx, flags, hashSeed); return DoHash(type, ctx, flags, hashSeed);
} }
int elemHash = Hash(retTypeTypeRef->mElementType, ctx, BfHashFlag_None, hashSeed) ^ HASH_MODTYPE + retTypeTypeRef->mRetTypeToken->mToken; int elemHash = Hash(retTypeTypeRef->mElementType, ctx, BfHashFlag_None, hashSeed) ^ HASH_MODTYPE + retTypeTypeRef->mRetTypeToken->mToken;