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

Function explicit-this invoke reify fix

This commit is contained in:
Brian Fiete 2023-12-25 11:23:20 -05:00
parent 0fc118c13c
commit 166f997b0a
2 changed files with 1 additions and 4 deletions

View file

@ -4675,9 +4675,6 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
typeInstance->mInstSize = std::max(0, typeInstance->mInstSize); typeInstance->mInstSize = std::max(0, typeInstance->mInstSize);
typeInstance->mInstAlign = std::max(0, typeInstance->mInstAlign); typeInstance->mInstAlign = std::max(0, typeInstance->mInstAlign);
if (typeInstance->IsFunction())
typeInstance->mAlwaysIncludeFlags = (BfAlwaysIncludeFlags)(typeInstance->mAlwaysIncludeFlags | BfAlwaysIncludeFlag_IncludeAllMethods);
ProcessCustomAttributeData(); ProcessCustomAttributeData();
int packing = 0; int packing = 0;
bool isUnion = false; bool isUnion = false;

View file

@ -1105,7 +1105,7 @@ BfType* BfMethodInstance::GetThisType()
auto thisType = mParams[0].mResolvedType; auto thisType = mParams[0].mResolvedType;
auto owner = GetOwner(); auto owner = GetOwner();
if ((thisType->IsValueType()) && ((mMethodDef->mIsMutating) || (!AllowsSplatting(-1))) && (!thisType->GetLoweredType(BfTypeUsage_Parameter))) if ((thisType->IsValueType()) && ((mMethodDef->mIsMutating) || (!AllowsSplatting(-1))) && (!thisType->GetLoweredType(BfTypeUsage_Parameter)))
return owner->mModule->CreatePointerType(thisType); return owner->mModule->mContext->mUnreifiedModule->CreatePointerType(thisType);
return thisType; return thisType;
} }
return GetParamType(-1); return GetParamType(-1);