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);