mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Fixed default case for discriminated union with empty payload member
This commit is contained in:
parent
e659a4e711
commit
38abaf6b3f
3 changed files with 2 additions and 12 deletions
|
@ -1357,11 +1357,6 @@ void BfCompiler::CreateVData(BfVDataModule* bfModule)
|
|||
if ((typeInst != NULL) && (!typeInst->IsReified()) && (!typeInst->IsUnspecializedType()))
|
||||
continue;
|
||||
|
||||
if (type->mTypeId == 0x0000045F)
|
||||
{
|
||||
NOP;
|
||||
}
|
||||
|
||||
bool needsTypeData = (needsTypeList) || ((type->IsObject()) && (needsObjectTypeData));
|
||||
bool needsVData = (type->IsObject()) && (typeInst->HasBeenInstantiated());
|
||||
|
||||
|
|
|
@ -4587,8 +4587,8 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
|
|||
}
|
||||
|
||||
SizedArray<BfIRValue, 3> values;
|
||||
values.Add(mModule->mBfIRBuilder->CreateConstAggZero(mModule->mBfIRBuilder->MapType(curCheckType->mBaseType)));
|
||||
values.Add(mModule->mBfIRBuilder->CreateConstAggZero(mModule->mBfIRBuilder->MapType(curCheckType->GetUnionInnerType())));
|
||||
values.Add(mModule->mBfIRBuilder->CreateConstAggZero(mModule->mBfIRBuilder->MapType(curCheckType->mBaseType)));
|
||||
values.Add(mModule->GetDefaultValue(curCheckType->GetUnionInnerType()));
|
||||
values.Add(mModule->mBfIRBuilder->CreateConst(dscrType->mTypeDef->mTypeCode, tagIdx));
|
||||
return BfTypedValue(mModule->mBfIRBuilder->CreateConstAgg(mModule->mBfIRBuilder->MapType(curCheckType), values), curCheckType);
|
||||
}
|
||||
|
|
|
@ -5305,11 +5305,6 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
|
|||
return BfIRValue();
|
||||
}
|
||||
|
||||
if (mContext->mBfTypeType == NULL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BfIRValue typeTypeData;
|
||||
int typeFlags = 0;
|
||||
if (needsTypeData)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue