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

Expanded const generic params to support structs

This commit is contained in:
Brian Fiete 2024-02-13 06:12:12 -05:00
parent d9de51a019
commit b80db38cdc
13 changed files with 443 additions and 36 deletions

View file

@ -987,7 +987,8 @@ void BfContext::RebuildType(BfType* type, bool deleteOnDemandTypes, bool rebuild
if (type->IsConstExprValue())
{
auto constExprType = (BfConstExprValueType*)type;
if ((constExprType->mValue.mTypeCode != BfTypeCode_StringId) && (constExprType->mType->mSize != mScratchModule->GetPrimitiveType(constExprType->mValue.mTypeCode)->mSize))
if ((constExprType->mValue.mTypeCode != BfTypeCode_StringId) && (constExprType->mValue.mTypeCode != BfTypeCode_Struct) &&
(constExprType->mType->mSize != mScratchModule->GetPrimitiveType(constExprType->mValue.mTypeCode)->mSize))
wantDeleteType = true;
}
if (wantDeleteType)