1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed comptime emission for enums

This commit is contained in:
Brian Fiete 2021-11-24 13:27:39 -08:00
parent c52ef256a5
commit ed80a8d88b
3 changed files with 30 additions and 4 deletions

View file

@ -2108,7 +2108,13 @@ void BfModule::UpdateCEEmit(CeEmitContext* ceEmitContext, BfTypeInstance* typeIn
typeInstance->mTypeDef->ClearOldMemberSets();
FinishCEParseContext(refNode, typeInstance, &ceParseContext);
FinishCEParseContext(refNode, typeInstance, &ceParseContext);
if (typeInstance->mTypeDef->mEmitParent != NULL)
{
// Remove generated fields like the 'underlying type' enum field
typeInstance->mFieldInstances.Resize(typeInstance->mTypeDef->mEmitParent->mFields.mSize);
}
}
void BfModule::HandleCEAttributes(CeEmitContext* ceEmitContext, BfTypeInstance* typeInstance, BfCustomAttributes* customAttributes, HashSet<BfTypeInstance*> foundAttributes)
@ -4000,7 +4006,7 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
}
if (hadNewMembers)
{
{
DoPopulateType(resolvedTypeRef, populateType);
return;
}