瀏覽代碼

Fixed type recursion issue checking attributes in DoCEEmit

Brian Fiete 3 年之前
父節點
當前提交
0e86b5c49d
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      IDEHelper/Compiler/BfModuleTypeUtils.cpp

+ 8 - 0
IDEHelper/Compiler/BfModuleTypeUtils.cpp

@@ -2820,6 +2820,14 @@ void BfModule::DoCEEmit(BfTypeInstance* typeInstance, bool& hadNewMembers, bool
 {
 {
 	BfLogSysM("BfModule::DoCEEmit %p\n", typeInstance);
 	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 ceEmitContext;
 	ceEmitContext.mType = typeInstance;
 	ceEmitContext.mType = typeInstance;
 	ExecuteCEOnCompile(&ceEmitContext, typeInstance, BfCEOnCompileKind_TypeInit, underlyingTypeDeferred);
 	ExecuteCEOnCompile(&ceEmitContext, typeInstance, BfCEOnCompileKind_TypeInit, underlyingTypeDeferred);