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

Appended field type population issue fixed, circular ref handled

This commit is contained in:
Brian Fiete 2022-07-05 13:01:46 -07:00
parent f326df71d9
commit 7278e090a1
2 changed files with 14 additions and 4 deletions

View file

@ -3781,7 +3781,7 @@ void BfIRBuilder::CreateTypeDefinition_Data(BfModule* populateModule, BfTypeInst
{
auto fieldTypeInst = fieldInstance->mResolvedType->ToTypeInstance();
if (fieldInstance->mDataSize != fieldTypeInst->mInstSize)
if (fieldInstance->mDataSize > fieldTypeInst->mInstSize)
{
SizedArray<BfIRType, 2> types;
types.push_back(MapTypeInst(fieldTypeInst));
@ -3789,7 +3789,7 @@ void BfIRBuilder::CreateTypeDefinition_Data(BfModule* populateModule, BfTypeInst
resolvedFieldIRType = CreateStructType(types);
}
else
resolvedFieldIRType = MapTypeInst(fieldTypeInst);
resolvedFieldIRType = MapTypeInst(fieldTypeInst);
}
if (fieldInstance->mDataOffset > dataPos)