mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Make AssumeInstantiated force default ctor reification
This commit is contained in:
parent
c4b3482135
commit
9154511e78
1 changed files with 9 additions and 0 deletions
|
@ -5179,6 +5179,10 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
|
||||||
}
|
}
|
||||||
if (typeInstance->IncludeAllMethods())
|
if (typeInstance->IncludeAllMethods())
|
||||||
implRequired = true;
|
implRequired = true;
|
||||||
|
// "AssumeInstantiated" also forces default ctor
|
||||||
|
if (((typeInstance->mAlwaysIncludeFlags & BfAlwaysIncludeFlag_AssumeInstantiated) != 0) &&
|
||||||
|
(methodDef->mMethodType == BfMethodType_Ctor) && (methodDef->mParams.IsEmpty()))
|
||||||
|
implRequired = true;
|
||||||
|
|
||||||
if ((typeOptionsIncludeAll) && (ApplyTypeOptionMethodFilters(true, methodDef, typeOptions)))
|
if ((typeOptionsIncludeAll) && (ApplyTypeOptionMethodFilters(true, methodDef, typeOptions)))
|
||||||
implRequired = true;
|
implRequired = true;
|
||||||
|
@ -5339,6 +5343,11 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
|
||||||
{
|
{
|
||||||
if ((attrTypeInst->mAttributeData->mAlwaysIncludeUser & BfAlwaysIncludeFlag_IncludeAllMethods) != 0)
|
if ((attrTypeInst->mAttributeData->mAlwaysIncludeUser & BfAlwaysIncludeFlag_IncludeAllMethods) != 0)
|
||||||
forceMethodImpl = true;
|
forceMethodImpl = true;
|
||||||
|
|
||||||
|
// "AssumeInstantiated" also forces default ctor
|
||||||
|
if (((attrTypeInst->mAttributeData->mAlwaysIncludeUser & BfAlwaysIncludeFlag_AssumeInstantiated) != 0) &&
|
||||||
|
(methodDef->mMethodType == BfMethodType_Ctor) && (methodDef->mParams.IsEmpty()))
|
||||||
|
forceMethodImpl = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue