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

Fixed erroneous data cycle detection in unions

This commit is contained in:
Brian Fiete 2021-02-08 07:56:23 -08:00
parent cf878097fe
commit fd001a2f69
3 changed files with 12 additions and 5 deletions

View file

@ -1686,7 +1686,7 @@ BfType* BfTypeInstance::GetUnionInnerType(bool* wantSplat)
{
SetAndRestoreValue<BfFieldDef*> prevTypeRef(mContext->mCurTypeState->mCurFieldDef, fieldDef);
mModule->PopulateType(checkInnerType);
mModule->PopulateType(checkInnerType, checkInnerType->IsValueType() ? BfPopulateType_Data : BfPopulateType_Declaration);
if (checkInnerType->mSize > unionSize)
unionSize = checkInnerType->mSize;
@ -2196,7 +2196,7 @@ bool BfTypeInstance::WantsGCMarking()
return true;
if ((IsEnum()) && (!IsPayloadEnum()))
return false;
BF_ASSERT(mDefineState >= BfTypeDefineState_Defined);
BF_ASSERT((mDefineState >= BfTypeDefineState_Defined) || (mTypeFailed));
return mWantsGCMarking;
}