1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Allow CreateObject for default ctors with append allocs

This commit is contained in:
Brian Fiete 2022-01-29 09:57:43 -05:00
parent aba01b2cc8
commit 3338f3c069
5 changed files with 61 additions and 14 deletions

View file

@ -5536,9 +5536,10 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
}
if (typeInstance->IncludeAllMethods())
implRequired = true;
// "AssumeInstantiated" also forces default ctor
if (((typeInstance->mAlwaysIncludeFlags & BfAlwaysIncludeFlag_AssumeInstantiated) != 0) &&
(methodDef->mMethodType == BfMethodType_Ctor) && (methodDef->mParams.IsEmpty()))
(methodDef->IsDefaultCtor()))
implRequired = true;
if ((typeOptionsIncludeAll) && (ApplyTypeOptionMethodFilters(true, methodDef, typeOptions)))