1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed type recursion issue checking attributes in DoCEEmit

This commit is contained in:
Brian Fiete 2022-06-23 06:07:22 -07:00
parent ca81fd14c2
commit 0e86b5c49d

View file

@ -2820,6 +2820,14 @@ void BfModule::DoCEEmit(BfTypeInstance* typeInstance, bool& hadNewMembers, bool
{
BfLogSysM("BfModule::DoCEEmit %p\n", typeInstance);
if (((typeInstance->IsInstanceOf(mCompiler->mValueTypeTypeDef))) ||
((typeInstance->IsInstanceOf(mCompiler->mEnumTypeDef))) ||
((typeInstance->IsInstanceOf(mCompiler->mAttributeTypeDef))))
{
// These are not allowed to emit
return;
}
CeEmitContext ceEmitContext;
ceEmitContext.mType = typeInstance;
ExecuteCEOnCompile(&ceEmitContext, typeInstance, BfCEOnCompileKind_TypeInit, underlyingTypeDeferred);