Explorar el Código

Fix function/delegate link error

Brian Fiete hace 1 año
padre
commit
504a7dca82
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      IDEHelper/Compiler/BfModuleTypeUtils.cpp

+ 3 - 3
IDEHelper/Compiler/BfModuleTypeUtils.cpp

@@ -4675,9 +4675,6 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
 	typeInstance->mInstSize = std::max(0, typeInstance->mInstSize);
 	typeInstance->mInstSize = std::max(0, typeInstance->mInstSize);
 	typeInstance->mInstAlign = std::max(0, typeInstance->mInstAlign);
 	typeInstance->mInstAlign = std::max(0, typeInstance->mInstAlign);
 
 
-	if (typeInstance->IsDelegateOrFunction())
-		typeInstance->mAlwaysIncludeFlags = (BfAlwaysIncludeFlags)(typeInstance->mAlwaysIncludeFlags | BfAlwaysIncludeFlag_IncludeAllMethods);
-
 	ProcessCustomAttributeData();
 	ProcessCustomAttributeData();
 	int packing = 0;
 	int packing = 0;
 	bool isUnion = false;
 	bool isUnion = false;
@@ -6540,6 +6537,9 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
 			if (typeInstance->IncludeAllMethods())
 			if (typeInstance->IncludeAllMethods())
 				implRequired = true;
 				implRequired = true;
 
 
+			if ((typeInstance->IsDelegateOrFunction()) && (methodDef->mName == "Invoke"))
+				implRequired = true;
+
 			// "AssumeInstantiated" also forces default ctor
 			// "AssumeInstantiated" also forces default ctor
 			if (((typeInstance->mAlwaysIncludeFlags & BfAlwaysIncludeFlag_AssumeInstantiated) != 0) &&
 			if (((typeInstance->mAlwaysIncludeFlags & BfAlwaysIncludeFlag_AssumeInstantiated) != 0) &&
 				(methodDef->IsDefaultCtor()))
 				(methodDef->IsDefaultCtor()))