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

Fixed issue with new stricter IsValueless check

This commit is contained in:
Brian Fiete 2020-04-24 16:56:29 -07:00
parent 35abc1d591
commit 868293f2f2

View file

@ -2984,6 +2984,9 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
std::function<void(BfType*)> splatIterate; std::function<void(BfType*)> splatIterate;
splatIterate = [&](BfType* checkType) splatIterate = [&](BfType* checkType)
{ {
if (checkType->IsValueType())
PopulateType(checkType, BfPopulateType_Data);
if (checkType->IsMethodRef()) if (checkType->IsMethodRef())
{ {
// For simplicitly, any methodRef inside a struct makes the struct non-splattable. This reduces cases of needing to // For simplicitly, any methodRef inside a struct makes the struct non-splattable. This reduces cases of needing to
@ -2991,8 +2994,7 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
hadNonSplattable = true; hadNonSplattable = true;
} }
else if (checkType->IsStruct()) else if (checkType->IsStruct())
{ {
PopulateType(checkType, BfPopulateType_Data);
auto checkTypeInstance = checkType->ToTypeInstance(); auto checkTypeInstance = checkType->ToTypeInstance();
if (checkTypeInstance->mBaseType != NULL) if (checkTypeInstance->mBaseType != NULL)
splatIterate(checkTypeInstance->mBaseType); splatIterate(checkTypeInstance->mBaseType);