mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Strip ref from comptype, rettype
This commit is contained in:
parent
12a3ba937a
commit
8922cc0c0d
2 changed files with 12 additions and 1 deletions
|
@ -9780,6 +9780,8 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
|
||||||
if (invokeMethodInstance != NULL)
|
if (invokeMethodInstance != NULL)
|
||||||
{
|
{
|
||||||
resolvedType = invokeMethodInstance->mReturnType;
|
resolvedType = invokeMethodInstance->mReturnType;
|
||||||
|
if ((resolvedType != NULL) && (resolvedType->IsRef()))
|
||||||
|
resolvedType = resolvedType->GetUnderlyingType();
|
||||||
return ResolveTypeResult(typeRef, resolvedType, populateType, resolveFlags);
|
return ResolveTypeResult(typeRef, resolvedType, populateType, resolveFlags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9813,6 +9815,8 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
|
||||||
{
|
{
|
||||||
auto methodRefType = (BfMethodRefType*)innerType;
|
auto methodRefType = (BfMethodRefType*)innerType;
|
||||||
resolvedType = methodRefType->mMethodRef->mReturnType;
|
resolvedType = methodRefType->mMethodRef->mReturnType;
|
||||||
|
if ((resolvedType != NULL) && (resolvedType->IsRef()))
|
||||||
|
resolvedType = resolvedType->GetUnderlyingType();
|
||||||
return ResolveTypeResult(typeRef, resolvedType, populateType, resolveFlags);
|
return ResolveTypeResult(typeRef, resolvedType, populateType, resolveFlags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3420,6 +3420,8 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
|
||||||
if (ctx->mRootTypeRef != retTypeTypeRef)
|
if (ctx->mRootTypeRef != retTypeTypeRef)
|
||||||
{
|
{
|
||||||
auto type = ctx->mModule->ResolveTypeRef(retTypeTypeRef, BfPopulateType_Identity, ctx->mResolveFlags);
|
auto type = ctx->mModule->ResolveTypeRef(retTypeTypeRef, BfPopulateType_Identity, ctx->mResolveFlags);
|
||||||
|
if ((type != NULL) && (type->IsRef()))
|
||||||
|
type = type->GetUnderlyingType();
|
||||||
return Hash(type, ctx, flags, hashSeed);
|
return Hash(type, ctx, flags, hashSeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3538,6 +3540,9 @@ int BfResolvedTypeSet::DoHash(BfTypeReference* typeRef, LookupContext* ctx, BfHa
|
||||||
else
|
else
|
||||||
cachedResolvedType = result.mType;
|
cachedResolvedType = result.mType;
|
||||||
|
|
||||||
|
if ((cachedResolvedType != NULL) && (cachedResolvedType->IsRef()))
|
||||||
|
cachedResolvedType = cachedResolvedType->GetUnderlyingType();
|
||||||
|
|
||||||
if (cachedResolvedType != NULL)
|
if (cachedResolvedType != NULL)
|
||||||
ctx->SetCachedResolvedType(typeRef, cachedResolvedType);
|
ctx->SetCachedResolvedType(typeRef, cachedResolvedType);
|
||||||
}
|
}
|
||||||
|
@ -3999,6 +4004,8 @@ bool BfResolvedTypeSet::Equals(BfType* lhs, BfTypeReference* rhs, LookupContext*
|
||||||
if (auto retTypeRef = BfNodeDynCastExact<BfModifiedTypeRef>(rhs))
|
if (auto retTypeRef = BfNodeDynCastExact<BfModifiedTypeRef>(rhs))
|
||||||
{
|
{
|
||||||
auto resolvedType = ctx->mModule->ResolveTypeRef(rhs);
|
auto resolvedType = ctx->mModule->ResolveTypeRef(rhs);
|
||||||
|
if ((resolvedType != NULL) && (resolvedType->IsRef()))
|
||||||
|
resolvedType = resolvedType->GetUnderlyingType();
|
||||||
return lhs == resolvedType;
|
return lhs == resolvedType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue