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

Add a dependency on element type in boxed type

This commit is contained in:
Brian Fiete 2022-01-14 07:07:33 -05:00
parent 5bc9642d26
commit e441032e4e

View file

@ -3493,18 +3493,22 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
if (resolvedTypeRef->IsBoxed())
{
BfBoxedType* boxedType = (BfBoxedType*)resolvedTypeRef;
if ((baseType != NULL) && (baseType->IsStruct()))
{
BfBoxedType* boxedType = (BfBoxedType*)resolvedTypeRef;
BfType* modifiedBaseType = baseType;
if (boxedType->IsBoxedStructPtr())
modifiedBaseType = CreatePointerType(modifiedBaseType);
boxedType->mBoxedBaseType = CreateBoxedType(modifiedBaseType);
PopulateType(boxedType->mBoxedBaseType);
// Use derivedFrom for both the boxed base type and the unboxed type
AddDependency(boxedType->mBoxedBaseType, typeInstance, BfDependencyMap::DependencyFlag_DerivedFrom);
}
AddDependency(boxedType->mElementType, typeInstance, BfDependencyMap::DependencyFlag_ValueTypeMemberData);
baseType = mContext->mBfObjectType;
}