From 0e86b5c49db21ee5463b738c3bf5f06112a50ce3 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 23 Jun 2022 06:07:22 -0700 Subject: [PATCH] Fixed type recursion issue checking attributes in DoCEEmit --- IDEHelper/Compiler/BfModuleTypeUtils.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IDEHelper/Compiler/BfModuleTypeUtils.cpp b/IDEHelper/Compiler/BfModuleTypeUtils.cpp index 7280a6f2..39ba8932 100644 --- a/IDEHelper/Compiler/BfModuleTypeUtils.cpp +++ b/IDEHelper/Compiler/BfModuleTypeUtils.cpp @@ -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);