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

Fix function/delegate link error

This commit is contained in:
Brian Fiete 2023-12-25 09:06:34 -05:00
parent b98f1ea6a4
commit 504a7dca82

View file

@ -4675,9 +4675,6 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
typeInstance->mInstSize = std::max(0, typeInstance->mInstSize);
typeInstance->mInstAlign = std::max(0, typeInstance->mInstAlign);
if (typeInstance->IsDelegateOrFunction())
typeInstance->mAlwaysIncludeFlags = (BfAlwaysIncludeFlags)(typeInstance->mAlwaysIncludeFlags | BfAlwaysIncludeFlag_IncludeAllMethods);
ProcessCustomAttributeData();
int packing = 0;
bool isUnion = false;
@ -6540,6 +6537,9 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
if (typeInstance->IncludeAllMethods())
implRequired = true;
if ((typeInstance->IsDelegateOrFunction()) && (methodDef->mName == "Invoke"))
implRequired = true;
// "AssumeInstantiated" also forces default ctor
if (((typeInstance->mAlwaysIncludeFlags & BfAlwaysIncludeFlag_AssumeInstantiated) != 0) &&
(methodDef->IsDefaultCtor()))